@@ -35,7 +35,9 @@ const SUPPORTED_MODELS = [
3535 'claude-sonnet-4.5-with-thinking-32k' ,
3636 'gemini-2.5-flash-lite' ,
3737 'gemini-2.5-flash' ,
38- 'gemini-2.5-flash-with-dynamic-thinking' ,
38+ 'gemini-2.5-flash-with-thinking-dynamic' ,
39+ 'gemini-2.5-flash-with-thinking-16k' ,
40+ 'gemini-2.5-flash-with-thinking-24k' ,
3941 'gemini-2.5-pro' ,
4042 'gemini-3-pro-preview' ,
4143 'gpt-5.1-no-thinking' ,
@@ -210,15 +212,23 @@ export class AiSDKRunner implements LlmRunner {
210212 } satisfies GoogleGenerativeAIProviderOptions ,
211213 } ,
212214 } ;
213- case 'gemini-2.5-flash-with-dynamic-thinking' :
215+ case 'gemini-2.5-flash-with-thinking-dynamic' :
216+ case 'gemini-2.5-flash-with-thinking-16k' :
217+ case 'gemini-2.5-flash-with-thinking-24k' :
218+ // -1 means "dynamic thinking budget":
219+ // https://ai.google.dev/gemini-api/docs/thinking#set-budget.
220+ let thinkingBudget = - 1 ;
221+ if ( modelName . endsWith ( '-16k' ) ) {
222+ thinkingBudget = 16_000 ;
223+ } else if ( modelName . endsWith ( '-24k' ) ) {
224+ thinkingBudget = 24_000 ;
225+ }
214226 return {
215227 model : google ( 'gemini-2.5-flash' ) ,
216228 providerOptions : {
217229 google : {
218230 thinkingConfig : {
219- // -1 means "dynamic thinking budget":
220- // https://ai.google.dev/gemini-api/docs/thinking#set-budget.
221- thinkingBudget : - 1 ,
231+ thinkingBudget : thinkingBudget ,
222232 includeThoughts : true ,
223233 } ,
224234 } satisfies GoogleGenerativeAIProviderOptions ,
0 commit comments