openclaw - 💡(How to fix) Fix DeepSeek V4 max thinking level degrades to high in cron isolated sessions [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#77684Fetched 2026-05-06 06:23:05
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Author
Timeline (top)
closed ×1commented ×1

When using DeepSeek V4 models (deepseek-v4-pro, deepseek-v4-flash) with thinking: "max" in cron tasks (isolated sessions), the thinking level silently degrades to "high". The model parameter reasoning_effort: "max" is not appended to the profile, causing potentially reduced reasoning quality in automated tasks.

This occurs because the thinking profile resolution has only one code path (Layer 1) that works in normal interactive sessions, but the DeepSeek extension's profile registration depends on activation: {onStartup: false} (line 43 of extensions/deepseek/index.js), which means the plugin profile is not reliably loaded in cron isolated sessions.

Error Message

  1. Check Gateway logs — no error, silent degradation Users relying on DeepSeek V4 models in automated/cron tasks get reduced reasoning quality without any error indication, potentially affecting trading decisions, report quality, or other automated reasoning tasks.

Root Cause

In dist/thinking-C7msqX62.js, the function resolveThinkingProfile builds a thinking profile and appends "max" level through catalogSupportsMax(context.compat):

// Original code - only Layer 1 exists:
if (binaryDecision !== true && catalogSupportsMax(context.compat)) appendProfileLevel(profile, "max");

catalogSupportsMax checks context.compat?.supportedReasoningEfforts for an array containing "max":

function catalogSupportsMax(compat) {
    return compat?.supportedReasoningEfforts?.includes?.("max");
}

However, the DeepSeek extension registers model compat in the provider plugin manifest using a boolean flag supportsReasoningEffort: true instead of the array format supportedReasoningEfforts: ["low", "high", "max"]. This means even when the plugin loads correctly, catalogSupportsMax returns false because the array doesn't exist.

In cron isolated sessions, the DeepSeek plugin profile is not loaded at all (due to onStartup: false), so even the supportsReasoningEffort flag is unavailable, and context.compat becomes undefined.

Code Example

// Original code - only Layer 1 exists:
if (binaryDecision !== true && catalogSupportsMax(context.compat)) appendProfileLevel(profile, "max");

---

function catalogSupportsMax(compat) {
    return compat?.supportedReasoningEfforts?.includes?.("max");
}

---

// After fix - three-layer fallback:
if (binaryDecision !== true && catalogSupportsMax(context.compat)) appendProfileLevel(profile, "max");
if (binaryDecision !== true && context.compat?.supportsReasoningEffort === true && context.reasoning === true && !catalogSupportsMax(context.compat)) appendProfileLevel(profile, "max");
if (binaryDecision !== true && context.reasoning !== false && context.modelId && /deepseek-v4/i.test(context.modelId) && !catalogSupportsMax(context.compat)) appendProfileLevel(profile, "max");

---

function catalogSupportsMax(compat) {
    // Only checks array format, fails on boolean format
    return compat?.supportedReasoningEfforts?.includes?.("max");
}

---

// extensions/deepseek/index.js
compat: {
    supportsReasoningEffort: true,   // boolean, not array!
    // Missing: supportedReasoningEfforts: ["low", "high", "max"]
}
RAW_BUFFERClick to expand / collapse

Bug: DeepSeek V4 "max" thinking level drops to "high" in cron isolated sessions

Description

When using DeepSeek V4 models (deepseek-v4-pro, deepseek-v4-flash) with thinking: "max" in cron tasks (isolated sessions), the thinking level silently degrades to "high". The model parameter reasoning_effort: "max" is not appended to the profile, causing potentially reduced reasoning quality in automated tasks.

This occurs because the thinking profile resolution has only one code path (Layer 1) that works in normal interactive sessions, but the DeepSeek extension's profile registration depends on activation: {onStartup: false} (line 43 of extensions/deepseek/index.js), which means the plugin profile is not reliably loaded in cron isolated sessions.

Root Cause

In dist/thinking-C7msqX62.js, the function resolveThinkingProfile builds a thinking profile and appends "max" level through catalogSupportsMax(context.compat):

// Original code - only Layer 1 exists:
if (binaryDecision !== true && catalogSupportsMax(context.compat)) appendProfileLevel(profile, "max");

catalogSupportsMax checks context.compat?.supportedReasoningEfforts for an array containing "max":

function catalogSupportsMax(compat) {
    return compat?.supportedReasoningEfforts?.includes?.("max");
}

However, the DeepSeek extension registers model compat in the provider plugin manifest using a boolean flag supportsReasoningEffort: true instead of the array format supportedReasoningEfforts: ["low", "high", "max"]. This means even when the plugin loads correctly, catalogSupportsMax returns false because the array doesn't exist.

In cron isolated sessions, the DeepSeek plugin profile is not loaded at all (due to onStartup: false), so even the supportsReasoningEffort flag is unavailable, and context.compat becomes undefined.

The Fix

Three-layer fallback chain added to dist/thinking-C7msqX62.js:

Layer 1 (existing): catalogSupportsMax(context.compat) — checks supportedReasoningEfforts array Layer 2: context.compat?.supportsReasoningEffort === true && context.reasoning === true && !catalogSupportsMax(context.compat) — handles boolean flag format Layer 3: context.reasoning !== false && /deepseek-v4/i.test(context.modelId) && !catalogSupportsMax(context.compat) — handles the case where compat is undefined (cron isolated session with missing plugin profile)

// After fix - three-layer fallback:
if (binaryDecision !== true && catalogSupportsMax(context.compat)) appendProfileLevel(profile, "max");
if (binaryDecision !== true && context.compat?.supportsReasoningEffort === true && context.reasoning === true && !catalogSupportsMax(context.compat)) appendProfileLevel(profile, "max");
if (binaryDecision !== true && context.reasoning !== false && context.modelId && /deepseek-v4/i.test(context.modelId) && !catalogSupportsMax(context.compat)) appendProfileLevel(profile, "max");

Additional Context

The catalogSupportsMax helper:

function catalogSupportsMax(compat) {
    // Only checks array format, fails on boolean format
    return compat?.supportedReasoningEfforts?.includes?.("max");
}

The DeepSeek plugin manifest registers compat as boolean:

// extensions/deepseek/index.js
compat: {
    supportsReasoningEffort: true,   // boolean, not array!
    // Missing: supportedReasoningEfforts: ["low", "high", "max"]
}

Steps to Reproduce

  1. Configure a model route using deepseek-v4-pro or deepseek-v4-flash with thinking: "max"
  2. Use it in a cron task (isolated session)
  3. The thinking level will be "high" instead of "max"
  4. Check Gateway logs — no error, silent degradation

Impact

Users relying on DeepSeek V4 models in automated/cron tasks get reduced reasoning quality without any error indication, potentially affecting trading decisions, report quality, or other automated reasoning tasks.

extent analysis

TL;DR

To fix the issue of DeepSeek V4 "max" thinking level dropping to "high" in cron isolated sessions, update the resolveThinkingProfile function in dist/thinking-C7msqX62.js to include a three-layer fallback chain.

Guidance

  1. Verify the issue: Reproduce the problem by configuring a model route with deepseek-v4-pro or deepseek-v4-flash and thinking: "max" in a cron task, then check the Gateway logs for silent degradation.
  2. Update the resolveThinkingProfile function: Implement the three-layer fallback chain to handle different compatibility formats and cron isolated sessions.
  3. Check the DeepSeek plugin manifest: Ensure that the supportedReasoningEfforts array is correctly registered in the plugin manifest, instead of the boolean supportsReasoningEffort flag.
  4. Test the fix: After applying the changes, re-run the cron task and verify that the thinking level remains "max" as expected.

Example

The updated resolveThinkingProfile function should include the following code:

if (binaryDecision !== true && catalogSupportsMax(context.compat)) appendProfileLevel(profile, "max");
if (binaryDecision !== true && context.compat?.supportsReasoningEffort === true && context.reasoning === true && !catalogSupportsMax(context.compat)) appendProfileLevel(profile, "max");
if (binaryDecision !== true && context.reasoning !== false && context.modelId && /deepseek-v4/i.test(context.modelId) && !catalogSupportsMax(context.compat)) appendProfileLevel(profile, "max");

Notes

This fix assumes that the issue is caused by the incorrect compatibility format in the DeepSeek plugin manifest and the missing profile registration in cron isolated sessions. If the problem persists after applying the fix, further investigation may be necessary.

Recommendation

Apply the workaround by updating the `

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING