Skip to content

Commit 6f7afb0

Browse files
committed
feat: support Gemini 2.5 Flash with dynamic thinking
1 parent 0531f31 commit 6f7afb0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

runner/codegen/ai-sdk-runner.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const SUPPORTED_MODELS = [
3333
'claude-sonnet-4.5-with-thinking-16k',
3434
'gemini-2.5-flash-lite',
3535
'gemini-2.5-flash',
36+
'gemini-2.5-flash-with-dynamic-thinking',
3637
'gemini-2.5-pro',
3738
'gemini-3-pro-preview',
3839
'gpt-5.1-no-thinking',
@@ -199,6 +200,20 @@ export class AiSDKRunner implements LlmRunner {
199200
} satisfies GoogleGenerativeAIProviderOptions,
200201
},
201202
};
203+
case 'gemini-2.5-flash-with-dynamic-thinking':
204+
return {
205+
model: google(modelName),
206+
providerOptions: {
207+
google: {
208+
thinkingConfig: {
209+
// -1 means "dynamic thinking budget":
210+
// https://ai.google.dev/gemini-api/docs/thinking#set-budget.
211+
thinkingBudget: -1,
212+
includeThoughts: true,
213+
},
214+
} satisfies GoogleGenerativeAIProviderOptions,
215+
},
216+
};
202217
case 'gpt-5.1-no-thinking':
203218
case 'gpt-5.1-thinking-low':
204219
case 'gpt-5.1-thinking-medium':

0 commit comments

Comments
 (0)