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:
- Custom
temperature,top_p, ortop_kvalues return HTTP 400. - Legacy
thinking: {"type": "enabled", "budget_tokens": ...}returns HTTP 400—replace it withthinking: {"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
- Claude Code: Upgrade to
v2.1.280+(Opus 5.5),v2.1.284+(Sonnet 5.5), orv2.1.321+(Fable 5.2). - Dify: Toggle OFF
TemperatureandTop Pinside each Claude 5.x LLM node. - Chatbox / LobeChat / Continue: Uncheck or remove custom sampling sliders from assistant presets and
config.yaml.
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
- Claude 5.x Native Messages API Proxy Guide · API Docs & SDK Reference · LLM Prompt Caching Guide
- Fix 401 / 404 / 400 / 429 API Errors · All English Guides
- claude-opus-5-5 Live Pricing · Full Model Pricing Table
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