Commit b6cc92a
committed
feat: add Gemini 3.1 Flash Live support for run_live()
Changes:
1. send_realtime(): use audio= instead of deprecated media= (all models)
2. send_content(): use send_tool_response() for function responses (all models)
3. send_content(): route text via send_realtime_input for 3.1 models
4. connect(): inject history_config for 3.1 models
Changes 1-2 are backward-compatible API upgrades (removing deprecated usage).
Changes 3-4 are conditional on model version containing '3.1'.
Tested in production with real phone calls on gemini-3.1-flash-live-preview.
Note: 3.1 models do not support enable_affective_dialog,
context_window_compression, or proactivity config fields.
These are documented in issue #5075 as model limitations.
Fixes #50181 parent f973673 commit b6cc92a
File tree
2 files changed
+24
-5
lines changed- src/google/adk/models
2 files changed
+24
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 108 | + | |
| 109 | + | |
112 | 110 | | |
113 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
114 | 123 | | |
115 | 124 | | |
116 | 125 | | |
| |||
128 | 137 | | |
129 | 138 | | |
130 | 139 | | |
131 | | - | |
| 140 | + | |
132 | 141 | | |
133 | 142 | | |
134 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
404 | 414 | | |
405 | 415 | | |
406 | 416 | | |
| |||
0 commit comments