anthropic-api
15 traces
- Claude Opus 4.7+ returns 400 for temperature/top_p/top_k; anthropic Python SDK v1.0 raises TypeErrorCode that sets temperature=0 (or topp, topk) for determinism fails: HTTP 400 on Claude 4.7-and-later models when a non-default value is set, and with anthropic Python SDK v1.0+ the call raises TypeError before any…
- claude-3-5-sonnet-20241022 / claude-3-7-sonnet-20250219 are retired — requests fail; use claude-sonnet-5-5Code (or tutorials / older model knowledge) hardcodes claude-3-5-sonnet-20240620, claude-3-5-sonnet-20241022, claude-3-5-sonnet-latest or claude-3-7-sonnet-20250219, and every request fails. Fix: Recommended…
- Anthropic API returns 403 forbidden "Request not allowed" from a server in an unsupported region (not an auth error)On a new cloud VM, Claude Code / the Agent SDK / a raw POST https://api.anthropic.com/v1/messages fails with HTTP 403: The same API key works from a laptop. Fix: No API key, base-URL, or Claude Code setting changes this.
- "thinking.type.enabled" is not supported for this model. — budget_tokens extended thinking removed on Claude Opus 4.7+A request with thinking: {"type": "enabled", "budgettokens": 10000} (the extended-thinking pattern from Claude 3.7 / Claude 4 docs) returns HTTP 400 on claude-opus-5-5: "thinking.type.enabled" is not supported for this…
- claude-sonnet-4-20250514 and claude-opus-4-20250514 retired 2026-06-15; claude-opus-4-1-20250805 retired 2026-08-05Agents and apps still defaulting to claude-sonnet-4-20250514, claude-opus-4-20250514 or claude-opus-4-1-20250805 (common in 2025 code samples and SDK examples) fail on the Claude API. Fix: claude-opus-5-5 is the…
- 'claude-opus-5-5' does not support tool types: computer_20251124. — use computer_toolset_20260801A computer-use agent that declares {"type": "computer20251124", "name": "computer", "displaywidthpx": ...} gets HTTP 400 on the Claude API / Google Cloud with claude-opus-5-5: 'claude-opus-5-5' does not support tool…
- Anthropic code_execution_20250522 + code-execution-2025-05-22 beta is legacy — use code_execution_20250825+An agent copies the May 2025 example: {"type": "codeexecution20250522", "name": "codeexecution"} with header anthropic-beta: code-execution-2025-05-22, then parses codeexecutionresult blocks. Fix: Remove…
- "thinking.type.disabled" is not supported for this model. — thinking cannot be turned off on Claude Opus 5.5Code that sends thinking: {"type": "disabled"} to save tokens (accepted by Claude Opus 5 and Sonnet 5) gets HTTP 400 on claude-opus-5-5: "thinking.type.disabled" is not supported for this model.
- Anthropic web_search_20260209+ calls search from code execution by default — set allowed_callers ["direct"]After bumping the web search tool from websearch20250305 to websearch20260209 or websearch20260318, responses contain code execution blocks, or a request on a model without programmatic tool calling returns 400 telling…
- Anthropic structured outputs: output_format is deprecated — move to output_config.format (no beta header)Code written for the late-2025 structured outputs beta (client.beta.messages.create(..., outputformat={...}, betas=["structured-outputs-2025-11-13"])) fails: without the beta header the API returns 400, and the Python…
- Claude model IDs have no date suffix from the 4.6 generation on — claude-opus-5-5 is already a pinned snapshotAn agent guesses IDs like claude-opus-5-5-20260922, claude-sonnet-5-5-latest or anthropic.claude-opus-5-5-v1:0 from the older claude-3-5-sonnet-20241022 / Bedrock ...-v1:0 patterns, and the request fails with an…
- claude-sonnet-4-5-20250929 is deprecated and retires 2026-11-30 — migrate to claude-sonnet-5-5claude-sonnet-4-5-20250929 still works today but is marked Deprecated; it was the default Sonnet in a lot of late-2025 code. Fix: Sonnet 5.5 uses adaptive thinking (default effort high), 1M context, 128K max output.
- claude-3-haiku-20240307 and claude-3-5-haiku-20241022 retired in 2026 — move to claude-haiku-4-5 or claude-haiku-5-5Cheap classification / routing jobs pinned to claude-3-haiku-20240307 or claude-3-5-haiku-20241022 (or claude-3-5-haiku-latest) start failing. Fix: The deprecation page's listed replacement is…
- tool_choice: type "tool" and "any" are not supported for this model. — forced tool use rejected on Claude Opus 5.5A request with toolchoice: {"type": "tool", "name": "extract"} or {"type": "any"} (the classic way to force JSON extraction through a tool) returns 400 on claude-opus-5-5, including on the token-counting endpoint:…
- Assistant-message prefill returns 400 on Claude Opus 4.6 and later — use structured outputs insteadThe old trick of ending messages with a partial assistant turn (e.g. Fix: After (structured outputs): Or move the formatting instruction into the system prompt.