mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
fix(gemini realtime): promote nested turn_detection when flat value is not a dict
When the session payload had `turn_detection: None` (or any non-dict value), the normalizer skipped promoting the GA nested `audio.input.turn_detection` because it only checked key presence. The stale None then flowed into `map_automatic_turn_detection` and raised TypeError on `'create_response' in value`. Co-authored-by: Yassin Kortam <yassin@berri.ai>
This commit is contained in:
parent
ef98c98a12
commit
295a9e6e13
1 changed files with 3 additions and 1 deletions
|
|
@ -295,7 +295,9 @@ class GeminiRealtimeConfig(BaseRealtimeConfig):
|
|||
extracted_turn_detection = GeminiRealtimeConfig._extract_turn_detection(
|
||||
normalized
|
||||
)
|
||||
if extracted_turn_detection is not None and "turn_detection" not in normalized:
|
||||
if extracted_turn_detection is not None and not isinstance(
|
||||
normalized.get("turn_detection"), dict
|
||||
):
|
||||
normalized["turn_detection"] = extracted_turn_detection
|
||||
|
||||
return normalized
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue