Google Gemini provider adapter.
Implements [tt_shared::Provider] for Google Gemini's
generateContent and streamGenerateContent endpoints.
Non-streaming and streaming (SSE via ?alt=sse) are both fully supported.
Embeddings use separate Gemini embedding models and are not wired here;
they return [ProviderError::Unsupported].
Usage
use ;
let provider = new;
API differences from OpenAI
- Model is in the URL path, not the request body.
- Auth is the
x-goog-api-keyrequest header (NOT a URL?key=query param — keys in URLs leak via logs/proxies; see review §5.2). - System messages map to
systemInstruction. - Tools use
functionDeclarationsinside a singletoolsobject. - Streaming uses SSE format with
?alt=sse.