diff --git a/.changeset/sixty-mirrors-shine.md b/.changeset/sixty-mirrors-shine.md new file mode 100644 index 00000000..4525f6d0 --- /dev/null +++ b/.changeset/sixty-mirrors-shine.md @@ -0,0 +1,5 @@ +--- +'@livekit/agents-plugin-google': patch +--- + +Skip streaming thought tokens from gemini realtime thinking model diff --git a/plugins/google/src/beta/realtime/realtime_api.ts b/plugins/google/src/beta/realtime/realtime_api.ts index 01d9fa31..a69262d5 100644 --- a/plugins/google/src/beta/realtime/realtime_api.ts +++ b/plugins/google/src/beta/realtime/realtime_api.ts @@ -1244,6 +1244,11 @@ export class RealtimeSession extends llm.RealtimeSession { const turn = serverContent.modelTurn; for (const part of turn.parts || []) { + // bypass reasoning/thought output + if (part.thought) { + continue; + } + if (part.text) { gen.outputText += part.text; gen.textChannel.write(part.text);