mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 05:54:43 +00:00
When a user runs /reasoning off, the session patch handler deleted the reasoningLevel field from the session entry. This caused get-reply-directives to treat reasoning as 'not explicitly set', which triggered resolveDefaultReasoningLevel() to re-enable reasoning for capable models (e.g. Claude Opus). The fix persists 'off' explicitly, matching how directive-handling.persist.ts already handles the inline /reasoning off command. Fixes #24406 Fixes #24411 Co-authored-by: echoVic <AkiraVic@outlook.com>
This commit is contained in:
@@ -186,11 +186,9 @@ export async function applySessionsPatchToStore(params: {
|
||||
if (!normalized) {
|
||||
return invalid('invalid reasoningLevel (use "on"|"off"|"stream")');
|
||||
}
|
||||
if (normalized === "off") {
|
||||
delete next.reasoningLevel;
|
||||
} else {
|
||||
next.reasoningLevel = normalized;
|
||||
}
|
||||
// Persist "off" explicitly so that resolveDefaultReasoningLevel()
|
||||
// does not re-enable reasoning for capable models (#24406).
|
||||
next.reasoningLevel = normalized;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user