claude-code - 💡(How to fix) Fix [DOCS] Agent SDK quickstart shows pre-v2.1.129 raw JSON for a 400 API error [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56497Fetched 2026-05-06 06:26:28
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

Error Message

TroubleshootingAPI error \thinking.type.enabled` is not supported for this model`

Claude Opus 4.7 replaces thinking.type.enabled with thinking.type.adaptive. Older Agent SDK versions fail with the following API error when you select claude-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."} 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. 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. | https://code.claude.com/docs/en/agent-sdk/quickstart | 314-322 | Troubleshooting example still shows API Error: 400 {"type":"invalid_request_error",...} | | 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 | 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.

Fix Action

Fix / Workaround

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.

RAW_BUFFERClick to expand / collapse

Documentation Type

Incorrect/outdated documentation

Documentation Location

https://code.claude.com/docs/en/agent-sdk/quickstart

Section/Topic

TroubleshootingAPI error \thinking.type.enabled` is not supported for this model`

Current Documentation

The docs currently say:

Claude Opus 4.7 replaces thinking.type.enabled with thinking.type.adaptive. Older Agent SDK versions fail with the following API error when you select claude-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:

PageLine(s)Context
https://code.claude.com/docs/en/agent-sdk/quickstart314-322Troubleshooting example still shows API Error: 400 {"type":"invalid_request_error",...}

Cross-reference:

PageContext
https://code.claude.com/docs/en/errorsThe 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.

extent analysis

TL;DR

Update the troubleshooting example in the quickstart documentation to match the current user-facing 400 error format.

Guidance

  • Review the main error reference page to reuse the cleaned wording for the thinking.type.enabled error.
  • Replace the raw JSON payload in the quickstart example with the cleaned error message.
  • Keep the upgrade guidance (Upgrade to Agent SDK v0.2.111 or later) below the updated error message.
  • Verify the change by checking the affected page (https://code.claude.com/docs/en/agent-sdk/quickstart, lines 314-322) to ensure the updated error format is displayed.

Example

No code snippet is necessary for this documentation update.

Notes

This change only affects the documentation and does not impact the underlying API or Agent SDK behavior.

Recommendation

Apply workaround: Update the documentation to reflect the current user-facing error format, as this will improve the consistency and clarity of the troubleshooting guide.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [DOCS] Agent SDK quickstart shows pre-v2.1.129 raw JSON for a 400 API error [1 comments, 2 participants]