fix(ai): correct Gemini SDK payload property thinkingBudgetTokens to thinkingBudget

This commit is contained in:
2026-05-19 16:15:59 -07:00
parent ba2cbd531d
commit f2dcd5597d
3 changed files with 19 additions and 3 deletions

View File

@@ -114,7 +114,7 @@ export async function callGeminiChat(opts: {
}
if (opts.includeThoughts) {
config.thinkingConfig = { thinkingBudgetTokens: 1024 };
config.thinkingConfig = { thinkingBudget: 1024 };
}
const fns = toGeminiFunctions(opts.tools ?? []);
@@ -174,7 +174,7 @@ export async function* streamGeminiChat(opts: {
const config: any = {
temperature: opts.temperature ?? 0.7,
maxOutputTokens: 8192,
thinkingConfig: { thinkingBudgetTokens: 1024 },
thinkingConfig: { thinkingBudget: 1024 },
};
if (opts.systemPrompt) {

View File

@@ -88,7 +88,7 @@ export class GeminiLlmClient implements LlmClient {
if (args.thinking_config) {
config.thinkingConfig = {
thinkingBudgetTokens: 1024,
thinkingBudget: 1024,
};
}