tt-provider-gemini 0.1.0

Google Gemini provider adapter — separate API shape (systemInstruction, functionDeclarations, streamGenerateContent).
Documentation

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 tt_provider_gemini::{GeminiProvider, ClientConfig};

let provider = GeminiProvider::new(ClientConfig::default());

API differences from OpenAI

  • Model is in the URL path, not the request body.
  • Auth is the x-goog-api-key request 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 functionDeclarations inside a single tools object.
  • Streaming uses SSE format with ?alt=sse.