Repository navigation
fix(anthropic): say what Anthropic documents in the sampling parameter deprecation warning - #486
Open
pcbeingused333 wants to merge 1 commit into
Open
pcbeingused333 wants to merge 1 commit into
pcbeingused333 wants to merge 1 commit into
Conversation
…r deprecation warning Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
DeprecationWarningthatChatAnthropic()raises whentemperature,top_portop_kare set says they "no longer have an effect on current Anthropic models". Anthropic's deprecations page says otherwise: these parameters return a 400 error when set to a non-default value on Claude 4.7 and later models (and Claude Mythos Preview), and API version 2026-10-21 removes them for every model. Someone following the warning and keeping the setting on a recent model would get an error instead of a harmless no-op.The warning now says that, with a link to the page. What is forwarded through
extra_bodyis unchanged, and so is the code comment's claim (it now matches the warning).A question for the maintainers, not part of this change:
translate_model_paramsforwards these parameters for any Claude model. Would you rather skip them for Claude 4.7+ and later models (with the warning) instead of letting the API reject the request?Tests: the two existing tests now match the new wording, and a new test pins its content (the parameter names, the Claude 4.7 and 2026-10-21 facts, and that the old claim is gone). The three fail on main and pass here; a CHANGELOG entry is included.
This change was made with Claude Code.
🤖 Generated with Claude Code