fix(ai): completely remove thinkingConfig from Gemini payload to prevent 400 errors

This commit is contained in:
2026-05-19 16:16:52 -07:00
parent a8cdc0344e
commit 2e02d3d8c6
2 changed files with 3 additions and 9 deletions

View File

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

View File

@@ -86,11 +86,7 @@ export class GeminiLlmClient implements LlmClient {
config.systemInstruction = `${args.systemPrompt}\n\nIMPERATIVE: Respond ONLY with this exact JSON format:\n${JSON.stringify(exampleJson)}\n\nDo NOT add any other fields.`;
}
if (args.thinking_config) {
config.thinkingConfig = {
thinkingBudget: 1024,
};
}
const run = async (currentContents: any[]) => {
console.log(`[GoogleGenAI] generateContent with ${this.model}`);