Provider routing
Gemini Interactions proxy for shared LLM calls
Run model-specific Gemini Interactions lifecycles while callers keep one blocking proxy request.
Developers adding Gemini as a provider without bringing Gemini-specific payloads into every app.
The problem
Gemini models differ between stored background Interactions and non-stored synchronous Interactions, which shared proxy callers should not have to coordinate.
How LLM Proxy helps
LLM Proxy selects the configured model lifecycle, polls and cleans up Gemini 3.x resources, and resolves Gemini 2.5 synchronously behind one blocking caller request.
How it works
- Configure providers.gemini.api_key, base_url, and Gemini provider offerings.
- Select provider=gemini or set Gemini as a tenant default.
- Send canonical messages through /v2 or compatibility text requests.
- Keep max_tokens within configured Gemini output limits.
Feature-to-benefit table
| Feature | Why it matters here | Example |
|---|---|---|
| Native adapter | The backend maps user and assistant messages into Gemini interaction steps. | System instructions use Gemini's system_instruction shape. |
| Resource lifecycle | The proxy polls queued and in-progress Gemini 3.x interactions server-side. | Gemini 2.5 requests are synchronous and non-stored; active 3.x resources are cancelled and deleted on exit. |
| Configured defaults | Omitted model uses the Gemini offering marked as the text default. | The default currently comes from config, not client code. |
| Output limit validation | Gemini max_tokens values above configured limits return 400 before upstream calls. | Known constraints are enforced at the edge. |
Use-case examples
Gemini summary
A service sends provider=gemini and omits model to use the configured default.
Long transcript
A /v2 messages request routes through Gemini without a Gemini SDK.
Limit check
A caller sets max_tokens inside the configured Gemini limit.
Objections and limitations
- Gemini dictation is not exposed through /dictate in this repo.
- Web search is not marked supported for Gemini in the current proxy catalog.
- The Gemini model list must be maintained in config.yml.
FAQ
What is the main job of Gemini Interactions proxy?
LLM Proxy selects the configured model lifecycle, polls and cleans up Gemini 3.x resources, and resolves Gemini 2.5 synchronously behind one blocking caller request.
Who should read this provider routing resource?
Developers adding Gemini as a provider without bringing Gemini-specific payloads into every app.
Does this page claim provider performance or pricing advantages?
No. The supported claim is about LLM Proxy's documented routing, configuration, management, security, usage, and deployment contracts. Provider cost, speed, rankings, and benchmark claims are not made here.
Where should setup details come from?
Use the main README and implementation notes for current command, config, and endpoint details. This page summarizes the workflow without replacing LLM Proxy documentation.
What should I read next?
A closely related resource is Integrate once through one multi-provider LLM proxy, which covers multi-provider LLM proxy.
Related resources
Use this pattern in LLM Proxy
Start from the canonical API reference, then use the management surface when the workflow needs tenant or provider configuration.
Open API reference