Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/google-thinking-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@livekit/agents-plugin-google": minor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you make it a patch bump?

---

Add thinkingConfig support to Google realtime API and update @google/genai.
2 changes: 1 addition & 1 deletion plugins/google/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"typescript": "^5.0.0"
},
"dependencies": {
"@google/genai": "^1.13.0",
"@google/genai": "^1.34.0",
"@livekit/mutex": "^1.1.1",
"@types/json-schema": "^7.0.15",
"json-schema": "^0.4.0"
Expand Down
8 changes: 8 additions & 0 deletions plugins/google/src/beta/realtime/realtime_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ interface RealtimeOptions {
contextWindowCompression?: ContextWindowCompressionConfig;
apiVersion?: string;
geminiTools?: LLMTools;
thinkingConfig?: types.ThinkingConfig;
}

/**
Expand Down Expand Up @@ -273,6 +274,11 @@ export class RealtimeModel extends llm.RealtimeModel {
* Gemini-specific tools to use for the session
*/
geminiTools?: LLMTools;

/**
* The thinking configuration for response generation
*/
thinkingConfig?: types.ThinkingConfig;
} = {},
) {
const inputAudioTranscription =
Expand Down Expand Up @@ -330,6 +336,7 @@ export class RealtimeModel extends llm.RealtimeModel {
contextWindowCompression: options.contextWindowCompression,
apiVersion: options.apiVersion,
geminiTools: options.geminiTools,
thinkingConfig: options.thinkingConfig,
};
}

Expand Down Expand Up @@ -1120,6 +1127,7 @@ export class RealtimeSession extends llm.RealtimeSession {
sessionResumption: {
handle: this.sessionResumptionHandle,
},
thinkingConfig: opts.thinkingConfig ? opts.thinkingConfig : undefined,
};

// Add generation fields at TOP LEVEL (NO generationConfig!)
Expand Down
Loading