Skip to content

Commit f51ec13

Browse files
committed
Use the options
1 parent f716cf8 commit f51ec13

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/api/providers/gemini.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,12 @@ export class GeminiHandler extends BaseProvider implements SingleCompletionHandl
7474
if (id?.endsWith(":thinking")) {
7575
id = id.slice(0, -9) as GeminiModelId
7676
info = geminiModels[id]
77-
thinkingConfig = { includeThoughts: true, thinkingBudget: 8192 }
78-
maxOutputTokens = info.maxTokens ?? undefined
77+
78+
thinkingConfig = this.options.modelMaxThinkingTokens
79+
? { thinkingBudget: this.options.modelMaxThinkingTokens }
80+
: undefined
81+
82+
maxOutputTokens = this.options.modelMaxTokens ?? info.maxTokens ?? undefined
7983
}
8084

8185
if (!info) {

0 commit comments

Comments
 (0)