openclaw - 💡(How to fix) Fix Plugin SDK: supportsAdaptiveThinking allowlist missing claude-opus-4-7 [2 comments, 3 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#72540Fetched 2026-04-28 06:34:47
View on GitHub
Comments
2
Participants
3
Timeline
3
Reactions
0
Timeline (top)
commented ×2closed ×1

Fix Action

Fix

Add claude-opus-4-7 to the supportsAdaptiveThinking model allowlist, OR audit all Opus-4.7 model descriptors to ensure they route through the adaptive branch. The fix lives in whatever supportsAdaptiveThinking function body references; grep for that function name.

Workaround

Disable thinking on Opus-4.7 invocations where thinking isn't essential: thinking: 'off' / thinkingEnabled: false in the spawn options. FT-4 v3 probe uses this workaround.

Code Example

if (model.reasoning) {
    if (options?.thinkingEnabled) 
        if (supportsAdaptiveThinking(model.id)) {
            params.thinking = { type: "adaptive" };
            if (options.effort) params.output_config = { effort: options.effort };
        } else params.thinking = {                    // <-- hits this branch on Opus 4.7
            type: "enabled",                           // <-- wrong schema for Opus 4.7
            budget_tokens: options.thinkingBudgetTokens || 1024
        };
    else if (options?.thinkingEnabled === false) params.thinking = { type: "disabled" };
}
RAW_BUFFERClick to expand / collapse

Plugin SDK: supportsAdaptiveThinking allowlist missing claude-opus-4-7

This issue is being filed as part of a batch of related upstream submissions discovered during architectural review of OpenClaw deployment. Filed locally 2026-04-23; submitted upstream 2026-04-27. See "Related issues (batch)" section at end for batch context.

Suggested labels (Mike to choose from labels actually available in target repo at submission time): bug, severity:high, plugin-sdk, transport:anthropic, model:claude-opus-4-7

Affected versions: v2026.4.15 (confirmed); earlier versions likely (14 fires since Apr 20)
Severity: HIGH — every Opus-4.7 invocation with thinking enabled fails immediately
Scope: All anthropic provider calls routing through OpenClaw's vertex-stream transport for claude-opus-4-7 when options.thinkingEnabled === true

Upstream project: OpenClaw plugin SDK + anthropic-vertex-stream transport

Diagnosis

File: dist/anthropic-vertex-stream-BpkPWKP9.js, lines 5064-5071

if (model.reasoning) {
    if (options?.thinkingEnabled) 
        if (supportsAdaptiveThinking(model.id)) {
            params.thinking = { type: "adaptive" };
            if (options.effort) params.output_config = { effort: options.effort };
        } else params.thinking = {                    // <-- hits this branch on Opus 4.7
            type: "enabled",                           // <-- wrong schema for Opus 4.7
            budget_tokens: options.thinkingBudgetTokens || 1024
        };
    else if (options?.thinkingEnabled === false) params.thinking = { type: "disabled" };
}

supportsAdaptiveThinking(model.id) currently returns false for claude-opus-4-7. Opus 4.7 requires the adaptive schema and rejects the legacy type: "enabled" schema with HTTP 400:

"thinking.type.enabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior.

Evidence

Gateway journal counts for thinking.type.enabled is not supported:

  • Today (2026-04-23): 9 fires across 2 main-agent runs + 5 subagent spawns (mccoy×2, athena, cathie, zell) + FT-4 probe
  • Since 2026-04-20: 14 fires total
  • 100% of fires involve model=claude-opus-4-7 provider=anthropic

Fix

Add claude-opus-4-7 to the supportsAdaptiveThinking model allowlist, OR audit all Opus-4.7 model descriptors to ensure they route through the adaptive branch. The fix lives in whatever supportsAdaptiveThinking function body references; grep for that function name.

Workaround

Disable thinking on Opus-4.7 invocations where thinking isn't essential: thinking: 'off' / thinkingEnabled: false in the spawn options. FT-4 v3 probe uses this workaround.

Related

  • Same pattern expected for any future Opus model variants until allowlist updated.
  • Affected agents today: main-agent (2), mccoy (2 subagent spawns), athena, cathie, zell, FT-4 probe session.
  • This was the secondary cause (first was identity-isolation) of FT-4 v2 probe failure at 19:55:05.

Request for upstream review

Please consider:

  1. Adding claude-opus-4-7 to the supportsAdaptiveThinking model allowlist.
  2. Auditing all Opus-4.7 model descriptors to ensure they route through the adaptive branch.
  3. Evaluating whether future Opus model variants will require the same allowlist addition (suggesting a defaulting pattern that catches new models automatically).

Related issues (batch)

This issue is filed as part of a batch of related upstream submissions:

  • [anthropics/claude-code#53710] F12-A: Glob tool false-negative on recently-created files — Anthropic Claude Code repo
  • [#72541] F11-C: Gateway completeness check false-negative on pure-relay agents — OpenClaw repo
  • [#72540] Opus 4.7: supportsAdaptiveThinking allowlist missing claude-opus-4-7 — OpenClaw repo
  • [#72539] Sub-B-FAR: Plugin SDK MessagePreSent outbound hook missing — OpenClaw repo

extent analysis

TL;DR

Add claude-opus-4-7 to the supportsAdaptiveThinking model allowlist to fix the issue with Opus-4.7 invocations.

Guidance

  • Identify the supportsAdaptiveThinking function and add claude-opus-4-7 to its allowlist to enable adaptive thinking for Opus-4.7 models.
  • As a temporary workaround, disable thinking on Opus-4.7 invocations by setting thinking: 'off' or thinkingEnabled: false in the spawn options.
  • Audit all Opus-4.7 model descriptors to ensure they route through the adaptive branch.
  • Consider implementing a defaulting pattern to automatically catch new Opus model variants and add them to the allowlist.

Example

No code example is provided as the fix involves modifying the supportsAdaptiveThinking function, which is not fully specified in the issue.

Notes

The issue is specific to Opus-4.7 models and the anthropic-vertex-stream transport. The fix should be applied to the supportsAdaptiveThinking function, but its location and implementation are not specified.

Recommendation

Apply the workaround by disabling thinking on Opus-4.7 invocations where thinking isn't essential, until the supportsAdaptiveThinking allowlist can be updated. This will prevent immediate failures, but a permanent fix requires updating the allowlist.

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 - 💡(How to fix) Fix Plugin SDK: supportsAdaptiveThinking allowlist missing claude-opus-4-7 [2 comments, 3 participants]