File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ export const promptAiSdkStream = async function* (
6363 model : Model
6464 userId : string | undefined
6565 chargeUser ?: boolean
66+ thinkingBudget ?: number
6667 } & Omit < Parameters < typeof streamText > [ 0 ] , 'model' >
6768) {
6869 const startTime = Date . now ( )
@@ -75,6 +76,7 @@ export const promptAiSdkStream = async function* (
7576 google : {
7677 thinkingConfig : {
7778 includeThoughts : true ,
79+ thinkingBudget : options . thinkingBudget ?? 128 ,
7880 } ,
7981 } satisfies GoogleGenerativeAIProviderOptions ,
8082 } ,
Original file line number Diff line number Diff line change @@ -17,11 +17,13 @@ export const getAgentStream = (params: {
1717 fingerprintId : string
1818 userInputId : string
1919 userId : string | undefined
20+ thinkingBudget ?: number
2021} ) => {
2122 const {
2223 costMode,
2324 selectedModel,
2425 stopSequences,
26+ thinkingBudget,
2527 clientSessionId,
2628 fingerprintId,
2729 userInputId,
@@ -65,7 +67,7 @@ export const getAgentStream = (params: {
6567 }
6668 if ( ! options . providerOptions . gemini . thinkingConfig ) {
6769 options . providerOptions . gemini . thinkingConfig = {
68- thinkingBudget : 0 ,
70+ thinkingBudget : thinkingBudget ?? 128 ,
6971 }
7072 }
7173 }
You can’t perform that action at this time.
0 commit comments