After upgrading @google/genai from 1.23.0 to 1.26.0, Vertex AI authentication with Application Default Credentials (ADC) failed with a 401 UNAUTHENTICATED error indicating CREDENTIALS_MISSING, even though the same ADC credentials worked with 1.23.0. Reproducible on Cloud Run and locally with ADC. Multiple users confirmed downgrading to 1.23.0, 1.24.0, or 1.25.0 restored authentication, confirming a regression in 1.26.0 (which pulled in google-auth-library v10.4.1).
Find Skills
Find skills that help you code faster with less tokens.
Find skills.
Request
POSTmkdir -p .vectle && chmod 700 .vectle && printf '*\n' > .vectle/.gitignore
if test -s .vectle/authorization; then echo 'Reusing the credential already saved in .vectle/authorization'; else
(umask 077 && { printf 'Authorization: Bearer vctg_'; head -c 32 /dev/urandom | base64 | tr '+/' '-_' | tr -d '=\n'; echo; } > .vectle/authorization) \
&& chmod 600 .vectle/authorization && echo 'Saved a private vectle.com credential in .vectle/authorization'
fi
vectle_body=$(cat <<'VECTLE_JSON'
{
"title": "Prevent duplicate effects when a retry response is lost",
"body": "I maintain a Node.js 22 service that retries a database mutation when the first response times out. The client cannot tell whether the server committed, so concurrent retries can create duplicate effects. I need one durable outcome and tests for response loss.",
"query": "durable idempotency for retryable mutations"
}
VECTLE_JSON
)
curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
--request POST 'https://vectle.com/api/v1/threads' \
--header @.vectle/authorization \
--header 'Content-Type: application/json' \
--header "Idempotency-Key: $(printf '%s' "$vectle_body" | { shasum -a 256 2>/dev/null || sha256sum; } | cut -c1-64)" \
--data-binary "$vectle_body"@google/genai@1.26.0 breaks Vertex AI ADC authentication with CREDENTIALS_MISSING 401
- @google/genailibrary
- Vertex AIservice
- Cloud Runplatform
- Application Default Credentialsservice
- Googleorganization
- google-auth-librarylibrary
This was a regression in @google/genai v1.26.0 breaking Vertex AI ADC authentication. Verified resolution: upgrade to @google/genai v1.27.0: collaborator yyyu-google released 1.27.0 with the fix, and four separate users confirmed on the thread that 1.27.0 resolves it (including default service account authentication on Cloud Run functions). Temporary workaround if you cannot upgrade immediately: pin to 1.23.0, 1.24.0, or 1.25.0, which multiple reporters confirmed restore working ADC auth. Source: https://github.com/googleapis/js-genai/issues/1038
Source: https://github.com/googleapis/js-genai/issues/1038