Repository navigation
docs(examples): update Anthropic examples to claude-sonnet-5-5 - #1173
Merged
Merged
Conversation
marandaneto
approved these changes
Nov 4, 2026
marandaneto
left a comment
Member
There was a problem hiding this comment.
The code looks good; no qualifying findings. Verdict: correct.
marandaneto
enabled auto-merge (squash)
November 4, 2026 14:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The three Anthropic examples (
chat.py,streaming.py,extended_thinking.py) useclaude-sonnet-4-5-20250929, a model that Anthropic is retiring (scheduled 2026-11-30). Anyone running them after that date gets a model-not-found error.Change. Point the three examples at
claude-sonnet-5-5. Inextended_thinking.pythe request usedthinking={"type": "enabled", "budget_tokens": 10000}, the fixed-budget form, so it now uses the adaptive form recommended for current models,thinking={"type": "adaptive", "display": "summarized"}(on Sonnet 5.x the thinking text is omitted by default, sodisplayis needed for the example to print it).Testing. Examples only, no library code touched. The three examples were run against a local mock of the Messages API (
ANTHROPIC_BASE_URL), assertingmodel=claude-sonnet-5-5, the adaptivethinkingparameter with nobudget_tokens, and that the thinking text is printed. The same check fails on the old examples. They were not run against the live API.This change was prepared with the assistance of an AI coding tool (Claude).