Skip to content

support Claude 4 Interleaved thinking (beta) #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2025

Conversation

heisenbergye
Copy link
Contributor

support Claude 4 Interleaved thinking (beta)

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

as OpenAI API format, add extra_body , anthropic_beta and thinking are required to enable interleaved thinking. when interleaved thinking enabled with reasoning_effort, reasoning_effort will be ignored.

curl http://127.0.0.1:8000/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer bedrock" \
-d '{
"model": "us.anthropic.claude-sonnet-4-20250514-v1:0",
"max_tokens": 2048,
"messages": [{
"role": "user",
"content": "xxxxxxxxxxxx"
}],
"stream": true,
"extra_body": {
"anthropic_beta": ["interleaved-thinking-2025-05-14"],
"thinking": {"type": "enabled", "budget_tokens": 4096}
}
}'

support Claude 4 Interleaved thinking (beta)

support Claude 4 Interleaved thinking (beta) Readme CN
@zxkane zxkane merged commit 3f1b56a into aws-samples:main Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants