Skip to content

[Bug]: Claude Opus 4.8 - thinking.type.enabled not supported (regression of #3477) #4614

@MAST1999

Description

@MAST1999

Prerequisites

  • I will write this issue in English (see our Language Policy)
  • I have searched existing issues to avoid duplicates
  • I am using the latest version of oh-my-opencode
  • I have read the documentation or asked an AI coding agent with this project's GitHub URL loaded and couldn't find the answer

Bug Description

OpenCode: 1.15.10
Plugin expected: 4.5.1
Plugin loaded: 4.5.1
Bun: 1.3.14

Selecting anthropic/claude-opus-4-8 (any variant) on any built-in agent returns the same 400 from the Anthropic API that #3477 first reported for Opus 4.7:

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

#3477 was closed as fixed for Opus 4.7, but the underlying hardcoded thinking.type: "enabled" is still present in the current dev source and now breaks again on Opus 4.8 (Anthropic flipped 4.8 to adaptive-only on release, same as 4.7).

The error is generated before the request reaches sst/opencode. opencode core already detects Opus 4.7+ correctly via anthropicOpus47OrLater in packages/opencode/src/provider/transform.ts and emits thinking: { type: "adaptive" }. The bug is that oh-my-openagent overrides that variant by setting thinking directly in every built-in agent's config:

File Line Code
src/agents/sisyphus.ts 601, 657 thinking: { type: "enabled", budgetTokens: 32000 }
src/agents/oracle.ts 588 thinking: { type: "enabled", budgetTokens: 32000 }
src/agents/momus.ts 415 thinking: { type: "enabled", budgetTokens: 32000 }
src/agents/metis.ts 310 thinking: { type: "enabled", budgetTokens: 32000 }
src/agents/sisyphus-junior/agent.ts 154 thinking: { type: "enabled", budgetTokens: 32000 }

The compatibility layer in packages/model-core/src/model-settings-compatibility.ts (L197-L205) only drops thinking when supportsThinking === false; it never rewrites type: "enabled"type: "adaptive". The claude-opus family is marked supportsThinking: true in model-capability-heuristics.ts (L14-L19), so the hardcoded object passes through unchanged and hits the 400.

The type union also cannot express "adaptive":

  • packages/model-core/src/model-resolution-types.ts L11: thinking?: { type: "enabled" | "disabled"; budgetTokens?: number }
  • packages/model-core/src/fallback-model-object.ts L8: same
  • packages/model-core/src/model-requirements.ts L9: same

So a coercion can't even be written without widening these types first.

The only model-version detector currently in the plugin is isClaudeOpus47Model in packages/model-core/src/model-family-detectors.ts, which strict-matches claude-opus-4-7 and does not cover 4.8 or future minors.

Steps to Reproduce

  1. Set any agent in oh-my-opencode.json to anthropic/claude-opus-4-8 (e.g. sisyphus).
  2. Start any task that invokes that agent.
  3. Anthropic returns 400 with "thinking.type.enabled" is not supported for this model.

The same reproduces with anthropic/claude-opus-4-7 and was previously reported in #3477.

Expected Behavior

For Claude Opus 4.7+ models, the plugin should emit:

{ "thinking": { "type": "adaptive" } }

and route the variant level (low / medium / high / xhigh / max) via output_config.effort, matching what sst/opencode's transform.ts already does for the same model family. The hardcoded { type: "enabled", budgetTokens: 32000 } should be replaced with model-aware logic, or the compatibility layer should coerce it transparently so existing agent configs self-heal.

Actual Behavior

Every task using Opus 4.7 or Opus 4.8 stops with the 400 above. No retry, no fallback. Older Claude models (Opus 4.6, Sonnet 4.6, Sonnet 4.5, etc.) still work because type: "enabled" is still accepted on them.

Doctor Output

 oMoMoMoMo Doctor

 ⚠ 1 issue found:

1. TUI plugin entry missing from tui.json
   The server plugin is registered in opencode.json, but the TUI plugin entry ("oh-my-openagent/tui") is missing from tui.json. The Roles · Models sidebar section and TUI-only commands will not appear.
   Fix: Re-run the installer (`npx oh-my-openagent install`) to auto-write tui.json, or add "oh-my-openagent/tui" to the "plugin" array in /home/mast/.config/opencode/tui.json.
   Affects: TUI sidebar, TUI commands

(The TUI warning is unrelated to this bug.)

Error Logs

Surfaced as a TUI toast:

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

Configuration

{
  "$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json",
  "agents": {
    "sisyphus":  { "model": "anthropic/claude-opus-4-8", "variant": "max" },
    "oracle":    { "model": "anthropic/claude-opus-4-8", "variant": "max" },
    "metis":     { "model": "anthropic/claude-opus-4-8", "variant": "max" },
    "momus":     { "model": "anthropic/claude-opus-4-8", "variant": "max" }
  }
}

Operating System

Linux

OpenCode Version

1.15.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions