Repository navigation
Add a Google Vertex sign-in check - #188
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 nouserInitiatedflag, 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'sisAuthErrorandauthErrorGuidance, so discovery and the check agree. It returnssign-in-required, with auserInitiatedadc_expiredupdate, only for expired Application Default Credentials. Other failures returnunknown(fail open) and brokered tokens returnok.unknown. An explicitGOOGLE_APPLICATION_CREDENTIALSfile overrides gcloud's well-known file, so a gcloud login can't repair a revoked key. The model list still labels thisadc_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 sameuserInitiatedflag as Bedrock's. The check, its result type and the update type are exported fromai-provider-bridge/providers. TheuserInitiateddocs 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.