openclaw - ✅(Solved) Fix [Bug]: opencode/claude-opus-4-7 rejects /think xhigh|adaptive|max despite docs declaring Opus 4.7 supports them [1 pull requests, 1 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#72729Fetched 2026-04-28 06:32:52
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
closed ×1cross-referenced ×1

The OpenCode plugin's thinking profile for claude-opus-4-7 only advertises the legacy 5 levels (off | minimal | low | medium | high), so /think xhigh, /think adaptive, and /think max all fail with "not supported", even though docs/tools/thinking.md states Opus 4.7 supports all three.

Root Cause

Root cause hypothesis

Fix Action

Fixed

PR fix notes

PR #72778: fix(opencode): expose Claude thinking levels

Description (problem / solution / changelog)

Summary

  • add an OpenCode thinking profile for proxied Claude Opus 4.7 and Opus/Sonnet 4.6 models
  • keep the default thinking ladder for other OpenCode models
  • add regression coverage for /think xhigh, adaptive, and max validation

Fixes #72729.

Tests

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • extensions/opencode/index.test.ts (modified, +46/-1)
  • extensions/opencode/index.ts (modified, +42/-1)
RAW_BUFFERClick to expand / collapse

Summary

The OpenCode plugin's thinking profile for claude-opus-4-7 only advertises the legacy 5 levels (off | minimal | low | medium | high), so /think xhigh, /think adaptive, and /think max all fail with "not supported", even though docs/tools/thinking.md states Opus 4.7 supports all three.

Steps to reproduce

  1. Configure an opencode:default auth profile (api_key)
  2. In a session using opencode/claude-opus-4-7, type /think xhigh
  3. Server rejects:

    Thinking level "xhigh" is not supported for opencode/claude-opus-4-7. Use one of: off, minimal, low, medium, high.

The same xhigh / adaptive / max directives work on anthropic/claude-opus-4-7 (direct provider).

Expected behavior

Per docs/tools/thinking.md (v2026.4.24):

  • xhigh → "ultrathink+" (GPT-5.2+ and Codex models, plus Anthropic Claude Opus 4.7 effort)
  • adaptive → ... Anthropic Claude Opus 4.7 ...
  • max → provider max reasoning (currently Anthropic Claude Opus 4.7)

OpenCode Zen routes Opus 4.7 requests to Anthropic, so the same level set should be exposed for opencode/claude-opus-4-7 as for anthropic/claude-opus-4-7.

Actual behavior

/think xhigh|adaptive|max are rejected with the legacy 5-level menu, indicating the runtime validation profile for opencode/claude-opus-4-7 doesn't include the dynamic levels.

Root cause hypothesis

  • extensions/anthropic/register.runtime.ts declares xhigh/adaptive/max for Opus 4.7 (xhigh referenced in the file).
  • extensions/opencode/ has no resolveThinkingProfile and no xhigh references at all, so runtime validation falls back to the default profile (the legacy 5 levels).

This is similar in shape to #71269 — same root pattern of "provider plugin doesn't surface dynamic thinking options to runtime/UI", just on a different plugin.

Proposed fix

OpenCode plugin should mirror the Anthropic plugin's thinking profile for proxied Anthropic models (claude-opus-4-7, claude-opus-4-6, claude-sonnet-4-6). Either by:

  1. Implementing resolveThinkingProfile in extensions/opencode/ that delegates to the underlying Anthropic profile based on model id, or
  2. Declaring per-model level sets in the plugin's manifest

Environment

  • OpenClaw 2026.4.24
  • Auth: opencode (api_key)
  • Channel: Telegram main session

extent analysis

TL;DR

The OpenCode plugin needs to be updated to include the dynamic thinking levels for Opus 4.7 models, either by implementing a resolveThinkingProfile function or declaring per-model level sets in its manifest.

Guidance

  • Verify that the extensions/anthropic/register.runtime.ts file correctly declares the dynamic thinking levels for Opus 4.7 models.
  • Check if the extensions/opencode/ directory has a resolveThinkingProfile function or any references to the dynamic thinking levels.
  • Consider implementing a resolveThinkingProfile function in extensions/opencode/ that delegates to the underlying Anthropic profile based on model id.
  • Alternatively, declare per-model level sets in the OpenCode plugin's manifest to include the dynamic thinking levels.

Example

// Example implementation of resolveThinkingProfile in extensions/opencode/
function resolveThinkingProfile(modelId: string) {
  if (modelId === 'claude-opus-4-7') {
    // Delegate to Anthropic profile for Opus 4.7
    return anthropicResolveThinkingProfile(modelId);
  }
  // Fallback to default profile
  return defaultThinkingProfile;
}

Notes

The proposed fix assumes that the Anthropic plugin's thinking profile is correctly implemented and that the OpenCode plugin can delegate to it. Additional testing may be required to ensure that the dynamic thinking levels are correctly surfaced to the runtime/UI.

Recommendation

Apply workaround by implementing a resolveThinkingProfile function in extensions/opencode/ that delegates to the underlying Anthropic profile based on model id, as this is a more targeted solution that can be implemented without modifying the plugin's manifest.

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…

FAQ

Expected behavior

Per docs/tools/thinking.md (v2026.4.24):

  • xhigh → "ultrathink+" (GPT-5.2+ and Codex models, plus Anthropic Claude Opus 4.7 effort)
  • adaptive → ... Anthropic Claude Opus 4.7 ...
  • max → provider max reasoning (currently Anthropic Claude Opus 4.7)

OpenCode Zen routes Opus 4.7 requests to Anthropic, so the same level set should be exposed for opencode/claude-opus-4-7 as for anthropic/claude-opus-4-7.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING