Repository navigation
Conversation
Co-Authored-By: Claude Sonnet 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.
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
Claude 5 model IDs now omit
temperature,top_p, andtop_kfrom Anthropic Messages requests. The predicate matchesclaude-{fable,haiku,mythos,opus,sonnet}-5with a version suffix or boundary, so Claude 3/4 and non-Anthropic behavior is unchanged.Fixes #6918. This does not overlap open PRs #6891/#6765, which only omit
top_pfor Claude 4.No cache, client, connection, long-lived object, timer, loop, or retained global state is added; the helper copies the local request body per call.
📝 补充信息 | Additional Information
Reproduction from #6918: a direct Anthropic request with
claude-sonnet-5-5succeeds, while NextChat's request with sampling fields is rejected. The current request builder always sendstemperature,top_p, and a hard-codedtop_k: 5.Validation:
1d3dc331512929a4b1d3e82354e72acce33b5c7awith the new Jest test: 1 suite failed withSyntaxError: The requested module '../app/client/platforms/anthropic' does not provide an export named 'isClaude5Model'; source restored byte-identically afterward.yarn test:ci --runInBand test/anthropic-sampling-params.test.ts— 7 passed.yarn test:ci --runInBand— 37 suites, 181 tests passed.yarn tsc --noEmit— passed;git diff --check— passed.anthropic.ts; no behavior outside this fix changed.🤖 Generated with Claude Code