fix(runner): completely remove thinkingConfig from Gemini payload
This commit is contained in:
@@ -113,9 +113,7 @@ export async function callGeminiChat(opts: {
|
|||||||
config.systemInstruction = opts.systemPrompt;
|
config.systemInstruction = opts.systemPrompt;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opts.includeThoughts) {
|
|
||||||
config.thinkingConfig = { thinkingBudget: 1024 };
|
|
||||||
}
|
|
||||||
|
|
||||||
const fns = toGeminiFunctions(opts.tools ?? []);
|
const fns = toGeminiFunctions(opts.tools ?? []);
|
||||||
if (fns) config.tools = fns;
|
if (fns) config.tools = fns;
|
||||||
@@ -174,7 +172,7 @@ export async function* streamGeminiChat(opts: {
|
|||||||
const config: any = {
|
const config: any = {
|
||||||
temperature: opts.temperature ?? 0.7,
|
temperature: opts.temperature ?? 0.7,
|
||||||
maxOutputTokens: 8192,
|
maxOutputTokens: 8192,
|
||||||
thinkingConfig: { thinkingBudget: 1024 },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (opts.systemPrompt) {
|
if (opts.systemPrompt) {
|
||||||
|
|||||||
10
vibn-agent-runner/strip_thinking_runner.js
Normal file
10
vibn-agent-runner/strip_thinking_runner.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
const fs = require('fs');
|
||||||
|
const file1 = 'src/llm/gemini-chat.ts';
|
||||||
|
|
||||||
|
if (fs.existsSync(file1)) {
|
||||||
|
let code1 = fs.readFileSync(file1, 'utf8');
|
||||||
|
code1 = code1.replace(/if \(opts\.includeThoughts\) \{\n\s*config\.thinkingConfig = \{ thinkingBudget: 1024 \};\n\s*\}/g, '');
|
||||||
|
code1 = code1.replace(/thinkingConfig: \{ thinkingBudget: 1024 \},/g, '');
|
||||||
|
fs.writeFileSync(file1, code1);
|
||||||
|
console.log("Stripped thinkingConfig entirely from Runner Gemini payload");
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user