Skip to content

google-dialog: Report Vertex AI auth failures and route Agent Platform correctly - #102

Merged
pragmatrix merged 4 commits into
masterfrom
improve-error-handling
Sep 28, 2026
Merged

pragmatrix merged 4 commits into
masterfrom
improve-error-handling

Conversation

@pragmatrix

@pragmatrix pragmatrix commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Why

Agent Platform (Vertex AI) sessions reported credential problems as a generic
SetupFailed error, 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 the
us/eu multi-regions or global.

Summary

  • google-dialog resolves Vertex AI ADC before connecting (bounded by a 10 s
    timeout matching the transport's connect timeout), so a credential problem is
    reported as an auth failure instead of a WebSocket handshake or setup failure.
  • Auth failures (bearer-token errors and 401/403 handshake rejections) are
    annotated with an ADC hint naming the fix (gcloud auth application-default login, or GOOGLE_APPLICATION_CREDENTIALS). The hint applies to the initial
    connect only.
  • Agent Platform routing uses the transport's Endpoint::VertexAi, which selects
    the correct host: us/eu → aiplatform.{location}.rep.googleapis.com,
    global → aiplatform.googleapis.com, other regions →
    {location}-aiplatform.googleapis.com.
  • Submodule gemini-live-rs bumped to de2e3e0: connect errors are forwarded to
    the client via SessionError::Connect, handshake rejections carry the endpoint
    URL with its query stripped (so credentials are not leaked), and the Vertex host
    routing above is implemented.
  • Workspace version bumped to 3.10.0 with a VERSIONING.md release entry.

Validation

  • cargo fmt --all -- --check — clean
  • cargo clippy -p google-dialog --all-targets -- -D warnings — clean
  • cargo test --workspace — green

Note

This was created entirely with AI assistance.

@pragmatrix pragmatrix changed the title google-dialog: Improve error handling if auth fails google-dialog: Report Vertex AI auth failures and route Agent Platform correctly Sep 28, 2026
@pragmatrix
pragmatrix merged commit 8e0bdf2 into master Sep 28, 2026
3 checks passed
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