Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/api/transform/reasoning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading