openclaw - ✅(Solved) Fix [Bug]: OpenRouter plugin missing supportsXHighThinking — xhigh rejected for DeepSeek V4 models [3 pull requests, 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#74788Fetched 2026-05-01 05:41:21
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
2
Timeline (top)
cross-referenced ×3commented ×1

The OpenRouter provider plugin does not implement supportsXHighThinking, so the /think xhigh directive is rejected for openrouter/deepseek/deepseek-v4-pro and openrouter/deepseek/deepseek-v4-flash. The underlying API fully supports it — reasoning.effort: "xhigh" maps to DeepSeek max reasoning on OpenRouter.

Error Message

  1. Error: Thinking level "xhigh" is not supported for openrouter/deepseek/deepseek-v4-pro. Use one of: off, minimal, low, medium, high.

Root Cause

The OpenRouter extension (extensions/openrouter/index.js) registers stream wrapping, catalog, auth, cache TTL, and reply hooks, but does not implement supportsXHighThinking. Without it, the thinking resolver falls back to the base profile (off through high).

The transport layer already handles xhigh/max correctly — in pi-ai/dist/providers/openai-completions.js, the OpenRouter thinking path sends reasoning: { effort: "xhigh" } which OpenRouter maps to DeepSeek max reasoning. The only gap is the provider profile not advertising these levels.

Fix Action

Fixed

PR fix notes

PR #74834: fix: 5 targeted bug fixes (gemini-cli, plugin commands, openrouter thinking, cron summary, LLM-only tools)

Description (problem / solution / changelog)

Summary

Five independent targeted fixes, each addressing a distinct bug:

1. fix(google): remove unsupported --skip-trust flag from gemini-cli backend (#74749)

gemini-cli >= 0.38.x dropped --skip-trust. Passing it causes yargs to exit non-zero on every call, resulting in 100% failure rate for the gemini CLI backend. Removed from both args and resumeArgs.

2. fix(plugins): guard against undefined plugin command handler result (#74800)

Plugin command handlers typed as Promise<PluginCommandResult> can return undefined at runtime. The caller in commands-plugin.ts immediately destructures result.continueAgent, crashing with Cannot read properties of undefined. Added a ?? {} fallback at the execution boundary.

3. fix(openrouter): add resolveThinkingProfile with xhigh for reasoning models (#74788)

OpenRouter had no resolveThinkingProfile, so /think xhigh was rejected for all models including openrouter/deepseek/deepseek-v4-pro. Added a profile that exposes xhigh for models with reasoning: true (unless explicitly excluded via isOpenRouterProxyReasoningUnsupportedModel).

4. fix(cron): prefer finalAssistantVisibleText over raw error text in task summary (#74807)

When a cron agentTurn run had only error payloads (tool call failed, agent self-corrected but never sent an explicit reply via messaging tool), fallbackSummary fell through to pickSummaryFromOutput(firstText) where firstText was the tool error. Now prefers finalAssistantVisibleText as an intermediate fallback before resorting to raw payload text.

5. fix(agents): skip tool allowlist guard for LLM-only runs (#74810)

buildEmptyExplicitToolAllowlistError raised an error when callableToolNames was empty, even when disableTools: true. LLM-only runs intentionally disable tools, so an empty callable set is expected. Added early return when disableTools === true.

Testing

Each fix is independently testable:

  • #74749: pnpm test -- src/agents/cli-backends.test.ts
  • #74800: Trigger any plugin command whose handler returns undefined
  • #74788: pnpm test -- src/agents/pi-embedded-runner/openrouter-model-capabilities.test.ts
  • #74807: pnpm test -- src/cron/isolated-agent
  • #74810: pnpm test -- src/agents/tool-allowlist-guard

🤖 Generated with Claude Code

Changed files

  • extensions/google/cli-backend.ts (modified, +2/-10)
  • extensions/openrouter/index.ts (modified, +18/-0)
  • src/agents/cli-backends.test.ts (modified, +2/-10)
  • src/agents/tool-allowlist-guard.ts (modified, +4/-0)
  • src/cron/isolated-agent/helpers.ts (modified, +10/-2)
  • src/plugins/commands.ts (modified, +1/-1)

PR #74839: fix(openrouter): add xhigh thinking profile for reasoning models

Description (problem / solution / changelog)

Summary

Targeted single-fix PR.

Closes #74788

🤖 Generated with Claude Code

Changed files

  • extensions/openrouter/index.ts (modified, +18/-0)

PR #73008: fix(deepseek): expose V4 max thinking levels

Description (problem / solution / changelog)

Summary

  • Problem: Native deepseek/deepseek-v4-pro and deepseek/deepseek-v4-flash rejected /think max and /think xhigh before request construction.
  • Why it matters: DeepSeek V4 stream handling already maps max reasoning requests, but users could not select those levels through OpenClaw thinking validation.
  • What changed: Added a DeepSeek V4 resolveThinkingProfile with off|minimal|low|medium|high|xhigh|max, added regression coverage, and documented the supported levels.
  • What did NOT change (scope boundary): No OpenRouter behavior, no core thinking resolver changes, no changelog entry.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #72893
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: The DeepSeek provider registered the V4 stream wrapper, but did not expose a provider resolveThinkingProfile, so thinking validation fell back to the base levels only.
  • Missing detection / guardrail: Existing DeepSeek tests covered payload mapping after a level was accepted, but not provider-profile level exposure.
  • Contributing context (if known): DeepSeek V4 request shaping already handled xhigh/max via the stream wrapper.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: extensions/deepseek/index.test.ts
  • Scenario the test should lock in: DeepSeek V4 models expose xhigh and max; non-V4 DeepSeek models do not opt into the V4 profile.
  • Why this is the smallest reliable guardrail: The bug was in provider profile registration, so the provider plugin test directly exercises the missing hook.
  • Existing test that already covers this (if any): Existing tests covered V4 payload mapping, not level acceptance.
  • If no new test is added, why not: N/A

User-visible / Behavior Changes

/think xhigh and /think max are accepted for native DeepSeek V4 Flash and Pro models.

Diagram (if applicable)

Before:
[/think max] -> [DeepSeek provider has no profile] -> [base levels only] -> [rejected]

After:
[/think max] -> [DeepSeek V4 profile] -> [max accepted] -> [stream wrapper maps request]

Additional live test result:

Human verified with Deepseek API Key:

DEEPSEEK_LIVE_TEST=1 OPENCLAW_LIVE_DEEPSEEK_MODEL=deepseek-v4-pro pnpm test:live extensions/deepseek/deepseek.live.test.ts -- --reporter=verbose

RUN  v4.1.5

✓ extensions/deepseek/deepseek.live.test.ts > deepseek plugin live > returns assistant text from the bundled V4 model catalog 1103ms
✓ extensions/deepseek/deepseek.live.test.ts > deepseek plugin live > accepts V4 thinking replay after a prior provider tool call 1299ms

Test Files  1 passed (1)
Tests       2 passed (2)
Duration    5.18s

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • docs/providers/deepseek.md (modified, +2/-0)
  • docs/tools/thinking.md (modified, +1/-0)
  • extensions/deepseek/index.test.ts (modified, +31/-0)
  • extensions/deepseek/index.ts (modified, +18/-4)
  • extensions/deepseek/models.ts (modified, +12/-0)
  • extensions/deepseek/stream.ts (modified, +2/-5)
RAW_BUFFERClick to expand / collapse

Summary

The OpenRouter provider plugin does not implement supportsXHighThinking, so the /think xhigh directive is rejected for openrouter/deepseek/deepseek-v4-pro and openrouter/deepseek/deepseek-v4-flash. The underlying API fully supports it — reasoning.effort: "xhigh" maps to DeepSeek max reasoning on OpenRouter.

Steps to reproduce

  1. Set model to openrouter/deepseek/deepseek-v4-pro
  2. Send /think xhigh
  3. Error: Thinking level "xhigh" is not supported for openrouter/deepseek/deepseek-v4-pro. Use one of: off, minimal, low, medium, high.

Root cause

The OpenRouter extension (extensions/openrouter/index.js) registers stream wrapping, catalog, auth, cache TTL, and reply hooks, but does not implement supportsXHighThinking. Without it, the thinking resolver falls back to the base profile (off through high).

The transport layer already handles xhigh/max correctly — in pi-ai/dist/providers/openai-completions.js, the OpenRouter thinking path sends reasoning: { effort: "xhigh" } which OpenRouter maps to DeepSeek max reasoning. The only gap is the provider profile not advertising these levels.

Related

  • #73718 — Same issue for the direct DeepSeek provider (OPEN)
  • #74445 — PR attempting to fix it for direct DeepSeek via resolveThinkingProfile (CLOSED, not merged yet)

Proposed fix

Add supportsXHighThinking to the OpenRouter plugin registration that returns true for DeepSeek V4 model IDs (deepseek/deepseek-v4-pro, deepseek/deepseek-v4-flash). Alternatively, implement resolveThinkingProfile to expose the full level set including xhigh and max for reasoning-capable models with known xhigh support.

Evidence

OpenRouter DeepSeek V4 Pro API docs:

"Reasoning efforts high and xhigh are supported; xhigh maps to max reasoning."

Source: https://openrouter.ai/deepseek/deepseek-v4-pro/api

Version

OpenClaw 2026.4.25

extent analysis

TL;DR

Add supportsXHighThinking to the OpenRouter plugin registration to enable support for xhigh thinking level.

Guidance

  • Implement supportsXHighThinking in the OpenRouter plugin to return true for DeepSeek V4 model IDs (deepseek/deepseek-v4-pro, deepseek/deepseek-v4-flash).
  • Alternatively, implement resolveThinkingProfile to expose the full level set including xhigh and max for reasoning-capable models with known xhigh support.
  • Verify the fix by sending the /think xhigh directive after updating the OpenRouter plugin.
  • Check the OpenRouter DeepSeek V4 Pro API documentation to ensure the reasoning.effort parameter is correctly mapped to DeepSeek max reasoning.

Example

// extensions/openrouter/index.js
const openRouterPlugin = {
  // ... existing code ...
  supportsXHighThinking: (modelId) => {
    return modelId === 'deepseek/deepseek-v4-pro' || modelId === 'deepseek/deepseek-v4-flash';
  },
};

Notes

The proposed fix assumes that the OpenRouter plugin has access to the model ID and can implement the supportsXHighThinking method accordingly.

Recommendation

Apply workaround by implementing supportsXHighThinking in the OpenRouter plugin, as this is a targeted fix for the specific issue and does not require upgrading to a new version.

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

openclaw - ✅(Solved) Fix [Bug]: OpenRouter plugin missing supportsXHighThinking — xhigh rejected for DeepSeek V4 models [3 pull requests, 1 comments, 2 participants]