Fix Claude 5.5 Temperature 400 & Migrate budget_tokens

Native Anthropic /v1/messages rejects custom temperature/top_p/top_k and legacy thinking.budget_tokens on Claude 5.5 and Fable 5.2; omit sampling overrides and use thinking={"type":"adaptive"} with output_config.effort.

Parameter Details
Live Model IDs claude-opus-5-5, claude-sonnet-5-5, claude-fable-5-2
Endpoint POST /v1/messages (preferred), POST /v1/chat/completions (compat)
SDK Base URL https://deepclub.net (Anthropic SDK / Claude Code, no /v1)
Billing & Privacy Per 1M tokens (including prompt cache rates). See Live Pricing; site-wide Zero Data Retention (ZDR)

1. Why Existing Claude Code & SDK Scripts Break with 400

On claude-opus-5-5, claude-sonnet-5-5, and claude-fable-5-2, Anthropic enforces two strict rules on native POST /v1/messages:

  1. Custom temperature, top_p, or top_k values return HTTP 400.
  2. Legacy thinking: {"type": "enabled", "budget_tokens": ...} returns HTTP 400—replace it with thinking: {"type": "adaptive"} + output_config: {"effort": "low" | "medium" | "high" | "max"}.

2. Clean Adaptive Thinking Migration (Python)

import os
from anthropic import Anthropic

client = Anthropic(
    api_key=os.environ["DEEPCLUB_API_KEY"],
    base_url="https://deepclub.net",  # No /v1 for official Anthropic SDK
)

msg = client.messages.create(
    model="claude-opus-5-5",
    max_tokens=4096,
    cache_control={"type": "ephemeral"},
    thinking={"type": "adaptive", "display": "summarized"},
    output_config={"effort": "medium"},
    messages=[{"role": "user", "content": "Audit this Postgres migration for table locks."}],
)
# Never hardcode msg.content[0].text because index 0 may be a thinking block
print("".join(block.text for block in msg.content if block.type == "text"))

3. Clearing Hidden Temperature Presets in Popular Clients

Frequently Asked Questions

Why does msg.content[0].text throw AttributeError with Adaptive Thinking?

When adaptive thinking triggers, msg.content[0] is a thinking block rather than a text block. Always filter for blocks where block.type == "text".

Does DeepClub Chat compatibility strip temperature automatically for Cline and Roo Code?

Yes. DeepClub strips disallowed sampling overrides on /v1/chat/completions compatibility routes, while keeping native /v1/messages strictly faithful to Anthropic’s spec.

Which Claude 5 model still accepts legacy temperature and budget_tokens?

claude-fable-5-1 retains legacy parameter compatibility, though new integrations should migrate to adaptive thinking on Opus 5.5, Sonnet 5.5, or Fable 5.2.

Related Engineering Guides & Troubleshooting

Frequently Asked Questions

Why does msg.content[0].text throw AttributeError with Adaptive Thinking?
When adaptive thinking triggers, msg.content[0] is a thinking block rather than a text block. Always filter for blocks where block.type == "text".
Does DeepClub Chat compatibility strip temperature automatically for Cline and Roo Code?
Yes. DeepClub strips disallowed sampling overrides on /v1/chat/completions compatibility routes, while keeping native /v1/messages strictly faithful to Anthropic’s spec.
Which Claude 5 model still accepts legacy temperature and budget_tokens?
claude-fable-5-1 retains legacy parameter compatibility, though new integrations should migrate to adaptive thinking on Opus 5.5, Sonnet 5.5, or Fable 5.2.

Updated