Skip to content

Add a Google Vertex sign-in check - #188

Merged
wch merged 4 commits into
mainfrom
vertex-sign-in-check
Nov 14, 2026
Merged

wch merged 4 commits into
mainfrom
vertex-sign-in-check

Conversation

@wch

@wch wch commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

Hosts need to ask "does this provider need a fresh sign-in now?" for Google Vertex the way they already can for AWS with checkAwsSignIn, both before a send and after a failed turn. Vertex had no such check, and its status updates had no userInitiated flag, so a host couldn't re-show a dismissed expiry toast for a check it ran itself.

  • checkGoogleVertexSignIn(providerId, credentials, logger, env). It mints a token from the same credential source the client factory uses and classifies failures with the model list's isAuthError and authErrorGuidance, so discovery and the check agree. It returns sign-in-required, with a userInitiated adc_expired update, only for expired Application Default Credentials. Other failures return unknown (fail open) and brokered tokens return ok.
  • Rejected key file returns unknown. An explicit GOOGLE_APPLICATION_CREDENTIALS file overrides gcloud's well-known file, so a gcloud login can't repair a revoked key. The model list still labels this adc_expired; the check doesn't, so hosts don't refuse sends with a prompt that can't help.
  • GoogleVertexProviderStatusUpdate. The Vertex status update type is now named and has the same userInitiated flag as Bedrock's. The check, its result type and the update type are exported from ai-provider-bridge/providers. The userInitiated docs are reworded because the check now also runs after a failed turn.

The monorepo consumer is the Posit Assistant PR that shows the sign-in prompt after a failed turn; it bumps this submodule to ac400c1.

wch added 4 commits November 11, 2026 23:50
Add a Vertex counterpart to checkAwsSignIn so hosts can ask "does this
provider need sign-in now?" before a send or after a failed turn. It mints
a token from the same credential source the client factory uses and
classifies failures with the model list's isAuthError + authErrorGuidance,
returning sign-in-required (with a userInitiated adc_expired update) only
for expired ADC; other failures are unknown (fail open) and brokered tokens
are ok.

Name the Vertex status update type (GoogleVertexProviderStatusUpdate) and
give it the same userInitiated flag as Bedrock's. Export the check, its
result type, and the update type from ai-provider-bridge/providers.
…ejected

An explicit key file overrides gcloud's well-known file, so a gcloud login
can't repair a rejected one (e.g. a revoked service-account key). The
model list labels it adc_expired, but checkGoogleVertexSignIn now returns
unknown for it so hosts don't refuse sends with a sign-in prompt that
can't help.
@wch
wch merged commit f456292 into main Nov 14, 2026
4 checks passed
@wch
wch deleted the vertex-sign-in-check branch November 14, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant