Evaluate moving the Google provider to the Interactions API
Google calls generateContent legacy and recommends the Interactions API (POST /v1beta/interactions, GA June 2026) for new work. It has the same shape as the Responses API JP already uses for OpenAI: typed steps, SSE events, and store: false for client-held history.
What it would and would not fix
Measured on 2026-11-07/08 against the Gemini API with curl:
- No early sign of life. On
streamGenerateContent, a 330k-token request was silent for 111s, then the HTTP headers and first data arrived 90µs apart. On Interactions,interaction.createdarrives in the same burst as the first output (12ms before the first thought summary), not when the request is accepted. Withstore: falseit carries noidorstatus. - Function calls are not streamed. On
gemini-4-argon, a 9.4k-tokenwrite_noteargument arrived as a singlearguments_deltaafter 139s of silence, despite the docs describingarguments_deltaas incremental.streamGenerateContentalso delivers a call whole, and the Gemini API silently ignoresstreamFunctionCallArguments(Vertex-only). - Text and thought summaries do stream, on both APIs, a delta every 0.3–3s.
So a migration would not have prevented the idle timeouts on large Gemini requests. Those are handled by providers.llm.google.silence_allowance_secs, with stream_idle_timeout_secs doubling on each timeout retry as a fallback.
Reasons to move anyway
- Typed error codes (
rate_limit_exceededvsquota_exceeded,deadline_exceeded,safety,malformed_function_call,missing_thought_signature) in place of matching message text. - Thought signatures travel as
thoughtsteps resent verbatim, and the backend handles a model switch, which could retire some of the signature repair ingoogle.rs. - One
thinking_levelacross model families instead of budget-or-level branching. incompleteandrequires_continuationstatuses, the latter for Gemini 4 output past 64K tokens.- New models and capabilities launch there first.
Costs
- The schema still moves: May 2026 replaced
outputswithsteps, renamed every streaming event, and sunset the old schema a month later, under anApi-Revisionheader onv1beta. - No explicit caching or Batch API on Interactions.
- No served
model_versionin the response. - A safety block is an HTTP 400 or a mid-stream
errorevent rather than a finish reason; what happens to text already streamed is undocumented. temperatureandtop_pare absent from the reference; Gemini 3.6+ ignores them on both APIs.storedefaults totrue, so every request must setstore: false.