Manage bidirectional WebSocket sessions for the Google Gemini Live API with BidiGenerateContentSetup validation, session leases, and reconnect backoff.
Handle Server-Sent Events (SSE) for Gemini and OpenAI-compatible streaming responses with pre-stream vs mid-stream failure classification and [DONE] verification.
Design RAG ingestion and query pipelines with Gemini embeddings and File Search using pinned embedding dimensions, separated queues, and citation checks.
Select exact model IDs with the same key and base URL, distinguish public and authenticated evidence, and handle catalog changes with an offline Python selector.
Design an application operation ledger for duplicate AI jobs, exact payload conflicts and uncertain outcomes; distinguish in-flight coalescing and caching.
A production checklist for moving Gemini OpenAI-compatible clients through a gateway while preserving 429 handling, model discovery, streaming, and failover.
Define job-level rate-limit SLOs, log redacted 429 telemetry across Gemini and OpenAI-compatible calls, and execute a 10-minute incident triage and postmortem workflow.