Always enabled reasoning for models that require it (#9836)

This commit is contained in:
Chris Estreich 2025-12-04 10:52:47 -08:00 committed by GitHub
parent 29385e01d7
commit ffff38be2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,7 +52,18 @@ export const getRooReasoning = ({
settings,
}: GetModelReasoningOptions): RooReasoningParams | undefined => {
// Check if model supports reasoning effort
if (!model.supportsReasoningEffort) return undefined
if (!model.supportsReasoningEffort) {
return undefined
}
if (model.requiredReasoningEffort) {
// Honor the provided effort if it's valid, otherwise let the model choose.
if (reasoningEffort && reasoningEffort !== "disable" && reasoningEffort !== "minimal") {
return { enabled: true, effort: reasoningEffort }
} else {
return { enabled: true }
}
}
// Explicit off switch from settings: always send disabled for back-compat and to
// prevent automatic reasoning when the toggle is turned off.