Repository navigation
google-dialog: Report Vertex AI auth failures and route Agent Platform correctly - #102
Merged
Merged
Conversation
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.
Why
Agent Platform (Vertex AI) sessions reported credential problems as a generic
SetupFailederror, so a missing or invalid Application Default Credentials(ADC) setup looked like a setup or handshake failure with no indication of how
to fix it. The Agent Platform endpoint was also hard-coded to
{location}-aiplatform.googleapis.com, which is not the host that serves theus/eumulti-regions orglobal.Summary
google-dialogresolves Vertex AI ADC before connecting (bounded by a 10 stimeout matching the transport's connect timeout), so a credential problem is
reported as an auth failure instead of a WebSocket handshake or setup failure.
annotated with an ADC hint naming the fix (
gcloud auth application-default login, orGOOGLE_APPLICATION_CREDENTIALS). The hint applies to the initialconnect only.
Endpoint::VertexAi, which selectsthe correct host:
us/eu→aiplatform.{location}.rep.googleapis.com,global→aiplatform.googleapis.com, other regions →{location}-aiplatform.googleapis.com.gemini-live-rsbumped tode2e3e0: connect errors are forwarded tothe client via
SessionError::Connect, handshake rejections carry the endpointURL with its query stripped (so credentials are not leaked), and the Vertex host
routing above is implemented.
3.10.0with aVERSIONING.mdrelease entry.Validation
cargo fmt --all -- --check— cleancargo clippy -p google-dialog --all-targets -- -D warnings— cleancargo test --workspace— greenNote
This was created entirely with AI assistance.