diff --git a/vibn-frontend/lib/ai/gemini-chat.ts b/vibn-frontend/lib/ai/gemini-chat.ts index f0f75e61..ac2355f7 100644 --- a/vibn-frontend/lib/ai/gemini-chat.ts +++ b/vibn-frontend/lib/ai/gemini-chat.ts @@ -124,6 +124,13 @@ export async function callGeminiChat(opts: { maxOutputTokens: 8192, }; + if (GEMINI_MODEL.includes("thinking") || GEMINI_MODEL.includes("pro")) { + config.thinkingConfig = { + thinkingBudget: 1024, + includeThoughts: true, + }; + } + if (opts.systemPrompt) { config.systemInstruction = opts.systemPrompt; } @@ -259,6 +266,13 @@ export async function* streamGeminiChat(opts: { maxOutputTokens: 8192, }; + if (GEMINI_MODEL.includes("thinking") || GEMINI_MODEL.includes("pro")) { + config.thinkingConfig = { + thinkingBudget: 1024, + includeThoughts: true, + }; + } + if (opts.systemPrompt) { config.systemInstruction = opts.systemPrompt; }