Repository navigation
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
The Google Interactions protocol from #52981 can only reach the Gemini API. Could you add a Vertex AI route for it, in
the same way the google-vertex provider already has Gemini, Messages and Responses routes? Teams that use Gemini only
through Vertex AI cannot use the new protocol today.
Current state on v2 (5cfe3b4)
packages/ai/src/protocols/google-interactions.tshas one base URL:
https://generativelanguage.googleapis.com/v1beta.packages/ai/src/providers/google/interactions.tsacceptsapiKeyandbaseURL, andproviders/google.tssends the
key asx-goog-api-key. There is noproject,locationor OAuth option, so a service account or Application
Default Credentials cannot be used. A staticAuthorizationheader is not practical because the token expires.packages/ai/src/providers/google-vertex.tsalready builds the project and location URL and the OAuth token for the
Gemini route, so the pieces exist.
Vertex endpoint (Preview; the documented project endpoint uses locations/global):
POST https://aiplatform.googleapis.com/v1beta1/projects/{project}/locations/global/interactions, with ADC or an
express-mode API key.
Developer guide
and API reference.
What we checked on Vertex (2026-10-09, gemini-3.8-flash, service account through ADC, called directly):
- Non-streaming and
?alt=ssestreaming both return 200. The stream sendsinteraction.created,
interaction.status_update,step.start,step.delta,step.stop,interaction.completedanddone. service_tier: "flex"in the body and thex-vertex-ai-llm-shared-request-type: flexheader (which the Vertex Gemini
route sends) are both accepted. The response does not say which tier ran, so it is worth confirming which one Vertex
uses.
Not requested: automatic continuation. On the same endpoint we compared full-history replay with
previous_interaction_id, over 5 turns with a 12.7K-token system instruction:
| Mode | Input tokens | Cached tokens |
|---|---|---|
store: false, full history (current default) |
63,782 | 32,605 |
store: true, previous_interaction_id, only the new turn |
63,782 | 0 |
Continuation billed the same input tokens and got no implicit cache hits in this test. The system instruction must
also be sent on every turn: when we sent it on turn 1 only, later answers were wrong. So the current store: false
default looks right for Vertex, and we are not asking for automatic continuation.
Activity
opencode-agent commentedon Oct 9, 2026
Thanks for the detailed request and the Vertex test results! To restate it: you'd like a Vertex AI route for the Google Interactions protocol, so it can be used with a project and location and with ADC/service-account auth (or an express-mode API key). That would match the Gemini, Messages and Responses routes that
google-vertexalready has.I checked
v2and it matches what you describe.protocols/google-interactions.tsonly targetsgenerativelanguage.googleapis.com/v1beta, andproviders/google/interactions.tsonly takesapiKey/baseURL. The project/location and OAuth handling ingoogle-vertex.tslooks like it could be reused. Your notes on keeping thestore: falsefull-history default and on confirming which flex tier Vertex applies are helpful too.Related:
The maintainers will look at this as a feature request.