openclaw - 💡(How to fix) Fix supportsAdaptiveThinking() omits opus-4-8 → reasoning-enabled requests send thinking.type.enabled → 400 + silent fallback

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…

On 2026.5.27, reasoning-enabled transport runs against claude-opus-4-8 (both the Anthropic-native and Bedrock paths) send thinking: {type: "enabled", budget_tokens: N} on the first attempt. The provider rejects with:

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

The fallback chain then retries, so users silently drop to a fallback model (or to thinking=off) even when Opus 4.8 is configured as primary. The fallback surfaces as a format-tagged model fallback banner.

This is the exact same bug class previously fixed for 4.7 in #67888 / #69460 / #72540 (PR #70119). The supportsAdaptiveThinking() allowlist is hardcoded per-model and was extended to opus-4-7 but not opus-4-8, so 4.8 falls into the legacy thinking.type: "enabled" branch.

Error Message

$ aws bedrock-runtime converse --model-id us.anthropic.claude-opus-4-8 --region us-east-1
--messages '[{"role":"user","content":[{"text":"say OK"}]}]'
--inference-config '{"maxTokens":2000}'
--additional-model-request-fields '{"reasoning_config":{"type":"enabled","budget_tokens":1024}}'

An error occurred (ValidationException) when calling the Converse operation: The model returned the following errors: "thinking.type.enabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior.

Root Cause

supportsAdaptiveThinking() matches model ids by substring and omits opus-4-8:

function supportsAdaptiveThinking(modelId) {
  return modelId.includes("opus-4-6") || modelId.includes("opus-4.6")
      || modelId.includes("opus-4-7") || modelId.includes("opus-4.7")   // 4.7 added by PR #70119
      || modelId.includes("sonnet-4-6") || modelId.includes("sonnet-4.6");
}

claude-opus-4-8 / us.anthropic.claude-opus-4-8 matches none of these → returns false → adapter sends thinking: {type: "enabled", budget_tokens: ...} → provider 400s → fallback. Same omission almost certainly exists in the second call-site (the OAuth/vertex transport-options builder) flagged in #67888.

Fix Action

Workaround

Set reasoning: false on the 4.8 model entry so OpenClaw sends plain Converse calls and never attaches the legacy reasoning block. This restores stable 4.8 operation at the cost of extended thinking until the allowlist is patched.

Code Example

function supportsAdaptiveThinking(modelId) {
  return modelId.includes("opus-4-6") || modelId.includes("opus-4.6")
      || modelId.includes("opus-4-7") || modelId.includes("opus-4.7")   // 4.7 added by PR #70119
      || modelId.includes("sonnet-4-6") || modelId.includes("sonnet-4.6");
}

---

$ aws bedrock-runtime converse --model-id us.anthropic.claude-opus-4-8 --region us-east-1 \
    --messages '[{"role":"user","content":[{"text":"say OK"}]}]' \
    --inference-config '{"maxTokens":2000}' \
    --additional-model-request-fields '{"reasoning_config":{"type":"enabled","budget_tokens":1024}}'

An error occurred (ValidationException) when calling the Converse operation: The model returned the following
errors: "thinking.type.enabled" is not supported for this model. Use "thinking.type.adaptive" and
"output_config.effort" to control thinking behavior.

---

$ aws bedrock-runtime converse --model-id us.anthropic.claude-opus-4-8 --region us-east-1 \
    --messages '[{"role":"user","content":[{"text":"say OK"}]}]' \
    --inference-config '{"maxTokens":2000}' \
    --additional-model-request-fields '{"thinking":{"type":"adaptive"},"output_config":{"effort":"medium"}}'

{ "output": { "message": { "role":"assistant", "content":[{"text":"OK"}] } }, "stopReason":"end_turn", ... }
RAW_BUFFERClick to expand / collapse

Summary

On 2026.5.27, reasoning-enabled transport runs against claude-opus-4-8 (both the Anthropic-native and Bedrock paths) send thinking: {type: "enabled", budget_tokens: N} on the first attempt. The provider rejects with:

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

The fallback chain then retries, so users silently drop to a fallback model (or to thinking=off) even when Opus 4.8 is configured as primary. The fallback surfaces as a format-tagged model fallback banner.

This is the exact same bug class previously fixed for 4.7 in #67888 / #69460 / #72540 (PR #70119). The supportsAdaptiveThinking() allowlist is hardcoded per-model and was extended to opus-4-7 but not opus-4-8, so 4.8 falls into the legacy thinking.type: "enabled" branch.

Root cause

supportsAdaptiveThinking() matches model ids by substring and omits opus-4-8:

function supportsAdaptiveThinking(modelId) {
  return modelId.includes("opus-4-6") || modelId.includes("opus-4.6")
      || modelId.includes("opus-4-7") || modelId.includes("opus-4.7")   // 4.7 added by PR #70119
      || modelId.includes("sonnet-4-6") || modelId.includes("sonnet-4.6");
}

claude-opus-4-8 / us.anthropic.claude-opus-4-8 matches none of these → returns false → adapter sends thinking: {type: "enabled", budget_tokens: ...} → provider 400s → fallback. Same omission almost certainly exists in the second call-site (the OAuth/vertex transport-options builder) flagged in #67888.

Reproduction (Bedrock, confirmed)

$ aws bedrock-runtime converse --model-id us.anthropic.claude-opus-4-8 --region us-east-1 \
    --messages '[{"role":"user","content":[{"text":"say OK"}]}]' \
    --inference-config '{"maxTokens":2000}' \
    --additional-model-request-fields '{"reasoning_config":{"type":"enabled","budget_tokens":1024}}'

An error occurred (ValidationException) when calling the Converse operation: The model returned the following
errors: "thinking.type.enabled" is not supported for this model. Use "thinking.type.adaptive" and
"output_config.effort" to control thinking behavior.

The adaptive schema succeeds:

$ aws bedrock-runtime converse --model-id us.anthropic.claude-opus-4-8 --region us-east-1 \
    --messages '[{"role":"user","content":[{"text":"say OK"}]}]' \
    --inference-config '{"maxTokens":2000}' \
    --additional-model-request-fields '{"thinking":{"type":"adaptive"},"output_config":{"effort":"medium"}}'

{ "output": { "message": { "role":"assistant", "content":[{"text":"OK"}] } }, "stopReason":"end_turn", ... }

Plain Converse (no thinking fields) also succeeds, which is why thinking=off sessions and sub-agents work fine — only reasoning-enabled runs hit the 400.

Expected behavior

Extend supportsAdaptiveThinking() (and the second OAuth/vertex call-site) to match opus-4-8 / opus-4.8, mirroring PR #70119's treatment of 4.7. Reasoning-enabled Opus 4.8 sessions should send thinking: {type: "adaptive"} + output_config: {effort: ...} instead of the legacy thinking.type: "enabled" block.

Workaround

Set reasoning: false on the 4.8 model entry so OpenClaw sends plain Converse calls and never attaches the legacy reasoning block. This restores stable 4.8 operation at the cost of extended thinking until the allowlist is patched.

Related

  • #87746 — adds claude-opus-4-8 to the model catalog (catalog availability; distinct from this thinking-schema issue — fixing #87746 will make 4.8 selectable but will NOT prevent this 400→fallback)
  • #67888, #69460, #72540 — the same bug for Opus 4.7
  • #70119 — the fix that added 4.7 to the allowlist (the change this issue asks to extend to 4.8)

Environment

  • OpenClaw 2026.5.27 (27ae826)
  • Bedrock provider, us-east-1, model us.anthropic.claude-opus-4-8
  • Reproduced via direct aws bedrock-runtime converse (provider-side, independent of OpenClaw)

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

Extend supportsAdaptiveThinking() (and the second OAuth/vertex call-site) to match opus-4-8 / opus-4.8, mirroring PR #70119's treatment of 4.7. Reasoning-enabled Opus 4.8 sessions should send thinking: {type: "adaptive"} + output_config: {effort: ...} instead of the legacy thinking.type: "enabled" block.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING