Skip to content

Commit ca793aa

Browse files
committed
PR feedback
1 parent ba9a6a1 commit ca793aa

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/api/transform/reasoning.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,15 @@ export const getRooReasoning = ({
5757
}
5858

5959
if (model.requiredReasoningEffort) {
60-
const providedEffort: GetModelReasoningOptions["reasoningEffort"] = reasoningEffort ?? "medium"
60+
const effort: GetModelReasoningOptions["reasoningEffort"] = reasoningEffort ?? "medium"
6161
const validEfforts: ReasoningEffortExtended[] = ["low", "medium", "high"]
6262

63-
// Honor the provided effort if it's valid, otherwise default to "medium".
64-
const effectiveEffort: ReasoningEffortExtended = validEfforts.includes(
65-
providedEffort as ReasoningEffortExtended,
66-
)
67-
? (providedEffort as ReasoningEffortExtended)
68-
: "medium"
69-
70-
return { enabled: true, effort: effectiveEffort }
63+
// Honor the provided effort if it's valid, otherwise let the model choose.
64+
if (validEfforts.includes(effort as ReasoningEffortExtended)) {
65+
return { enabled: true, effort: effort as ReasoningEffortExtended }
66+
} else {
67+
return { enabled: true }
68+
}
7169
}
7270

7371
// Explicit off switch from settings: always send disabled for back-compat and to

0 commit comments

Comments
 (0)