mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-05 01:59:27 +00:00
* feat(gemini): send realtime reasoning effort as the Gemini Live thinking level gemini/gemini-4-live picks its reasoning mode from setup.generationConfig.thinkingConfig.thinkingLevel, but /v1/realtime dropped session.reasoning.effort. The cost map row now declares the levels Google accepts, a declared level reaches Google, and an undeclared one is rejected unless drop_params is set * test(vertex_ai): cover the realtime reasoning effort on the Vertex Live setup path * fix(gemini): keep a Gemini Live turn left IN_PROGRESS and its answer in one realtime response At medium and high thinking levels Gemini Live speaks a holding line, ends that turn with interactionStatus IN_PROGRESS, then answers in a second turn. The realtime transformation now closes the holding line's item, keeps the response open, gives the answer the next output index, and sends one response.done whose usage sums both turns. A session closed while a turn is still IN_PROGRESS bills that turn once, and a tool call during a holding line closes that line first gemini/gemini-3.1-flash-live-preview and gemini/gemini-3.8-live-extended-thinking now list the thinking levels Google accepts for them, so a realtime reasoning effort reaches those models too * fix(gemini): bill every Gemini Live tool turn and read thinking levels from the catalog row A turn that ends with a bare turnComplete after a tool call now carries its usage into the next response.done, so a model that speaks before the call, or calls it silently, is billed for both turns. A per-modality entry without a tokenCount counts as 0 instead of dropping the whole breakdown. Thinking levels come from the cost map row, never a router deployment's model_info copy, and a Live model whose row lists no levels rejects a reasoning effort unless drop_params is set A bill written when the session closes mid-response is labeled client_cancelled instead of turn_detected * fix(gemini): read Live thinking levels only from the deployment's own provider row A Vertex AI Live deployment fell back to the Google AI Studio row and sent its thinking level to Vertex. The level list now comes only from the row of the provider the deployment runs on The error for an effort on a model with no listed levels now says LiteLLM lists none, since Google can still think on those models Adds a regression test for a barge-in during the answer that follows a holding line, built from the frames Gemini Live sends * fix(gemini): give a question asked during the Live thinking pause its own response * refactor(gemini): drop the realtime reasoning param no code reads * fix(gemini): end an interrupted realtime turn as cancelled when Gemini keeps thinking |
||
|---|---|---|
| .. | ||
| audio_transcription | ||
| batches | ||
| decisions | ||
| files | ||
| google_genai | ||
| image_edit | ||
| image_generation | ||
| realtime | ||
| vector_stores | ||
| videos | ||
| __init__.py | ||
| test_empty_image_response.py | ||
| test_gemini_client_setup.py | ||
| test_gemini_common_utils.py | ||
| test_gemini_image_generation_transformation.py | ||
| test_gemini_streaming.py | ||
| test_gemini_tts.py | ||
| test_image_usage_transformation.py | ||