Skip to content

[BUG] Claude Fable 5 / Mythos 5 fail with 400 on thinking.type.disabled (adaptive-thinking-only models) #159

@devinoldenburg

Description

@devinoldenburg

Describe the bug

Claude Fable 5 (claude-fable-5, GA 2026‑06‑09) and Claude Mythos 5 (claude-mythos-5) are adaptive‑thinking‑only models: thinking is always on, and thinking: { type: "disabled" } is rejected by the Messages API.

Through this plugin's OAuth path, Fable 5 works fine for normal requests (thinking unset → adaptive). But the moment the outgoing body carries thinking: { type: "disabled" } — which OpenCode emits for a "no‑thinking" model variant / reasoning toggled off — every request to these models fails:

HTTP 400 invalid_request_error
"thinking.type.disabled" is not supported for this model. Thinking defaults
to adaptive mode when not specified; use "thinking.type.enabled" with
"budget_tokens" for extended thinking.

Opus/Sonnet/Haiku are unaffected (they support disabled thinking), so this is specific to the Fable/Mythos line.

To Reproduce

  1. Authenticate with Claude Pro/Max (OAuth) via this plugin.
  2. Select anthropic/claude-fable-5 (it's already in the models.dev catalog) using a "no‑thinking" variant, i.e. a request where the body sets thinking: { type: "disabled" }.
  3. Send any message.
  4. See the 400 invalid_request_error above. The request never reaches the model.

Verified directly against api.anthropic.com through the plugin's own request transform using a Pro/Max OAuth token:

  • claude-fable-5 + thinking: { type: "disabled" }400
  • claude-fable-5 + thinking unset → 200 (adaptive)
  • claude-fable-5 + thinking: { type: "enabled", budget_tokens }200
  • claude-opus-4-8 + thinking: { type: "disabled" }200 (control; non‑adaptive models are fine)

Expected behavior

Selecting Fable 5 / Mythos 5 should work in every OpenCode reasoning configuration, the same way Opus/Sonnet do. A thinking: { type: "disabled" } block (which the model cannot honor) should not hard‑fail the request — it should fall back to the model's default adaptive thinking.

Environment

  • Plugin: @ex-machina/opencode-anthropic-auth@1.8.1
  • OpenCode: 1.16.2
  • Auth: Claude Pro/Max OAuth (subscription) path
  • OS: Linux
  • (CLI plugin — browser/smartphone fields N/A)

Additional context

Root cause: rewriteRequestBody passes the thinking block straight through, and the Fable/Mythos models reject type: "disabled".

Proposed fix: when the target model is adaptive‑thinking‑only (match claude-fable- / claude-mythos- ID prefixes), drop an unsupported thinking: { type: "disabled" } block so the request succeeds with the model's default adaptive thinking. Leave enabled thinking and unset thinking untouched; never touch non‑adaptive models.

I have a branch with the fix + unit tests + README + changeset (full suite green, live‑verified that the disabled‑thinking case returns 200 after the patch). PR incoming.

References:


I cleared ~/.cache/opencode and confirmed the behavior on the latest published version before filing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions