[DOCS] Agent SDK quickstart shows pre-v2.1.129 raw JSON for a 400 API error
Documentation Type
Incorrect/outdated documentation
Documentation Location
https://code.claude.com/docs/en/agent-sdk/quickstart
Section/Topic
Troubleshooting → API error \thinking.type.enabled\ is not supported for this model
Current Documentation
The docs currently say:
Claude Opus 4.7 replacesthinking.type.enabledwiththinking.type.adaptive. Older Agent SDK versions fail with the following API error when you selectclaude-opus-4-7:API Error: 400 {"type":"invalid_request_error","message":"\"thinking.type.enabled\" is not supported for this model. Use \"thinking.type.adaptive\" and \"output_config.effort\" to control thinking behavior."}
What's Wrong or Missing?
This troubleshooting example appears to reflect the older pre-v2.1.129 behavior where an unrecognized 400 surfaced the raw JSON body instead of the underlying user-facing error message.
That makes the page inconsistent with the current Claude Code behavior described in the v2.1.129 changelog entry, and inconsistent with the main error reference page, which already documents this error family using a cleaned message format instead of a raw JSON object.
Suggested Improvement
Update the quickstart example to match the current user-facing 400 error format rather than showing the raw JSON payload.
For this specific troubleshooting case, the safest fix is to reuse the cleaned wording already shown on the main error reference page for the same thinking.type.enabled error, then keep the upgrade guidance (Upgrade to Agent SDK v0.2.111 or later) below it.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Line(s) | Context |
|------|---------|---------|
| https://code.claude.com/docs/en/agent-sdk/quickstart | 314-322 | Troubleshooting example still shows API Error: 400 {"type":"invalid_request_error",...} |
Cross-reference:
| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/errors | The thinking.type.enabled is not supported for this model section already uses a cleaned API Error: 400 ... format instead of raw JSON |
Total scope: 1 page affected
Relevant changelog context: v2.1.129 says Claude Code fixed API errors with unrecognized 400 status codes showing raw JSON instead of the underlying error message.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗