mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
fix: support models with fixed reasoning levels in Gemini thinkingConfig guard
This commit is contained in:
parent
e13dfb030c
commit
3b759c7806
1 changed files with 5 additions and 1 deletions
|
|
@ -133,8 +133,12 @@ export const getGeminiReasoning = ({
|
|||
}: GetModelReasoningOptions): GeminiReasoningParams | undefined => {
|
||||
// Only send thinkingConfig to models that advertise support for it; Gemini 3 rejects
|
||||
// the field and returns 400 otherwise.
|
||||
// This checks for: budget support, effort UI support, or fixed reasoning level defaults.
|
||||
const supportsThinkingConfig =
|
||||
typeof model.maxThinkingTokens === "number" || model.supportsReasoningBudget || model.supportsReasoningEffort
|
||||
typeof model.maxThinkingTokens === "number" ||
|
||||
model.supportsReasoningBudget ||
|
||||
model.supportsReasoningEffort ||
|
||||
!!model.reasoningEffort
|
||||
|
||||
// Budget-based (2.5) models: use thinkingBudget, not thinkingLevel.
|
||||
if (shouldUseReasoningBudget({ model, settings })) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue