fix(anthropic): bump forged Claude Code pin to 2.1.280 - #168
Merged
Merged
Conversation
Anthropic rejects opus-5-5 (and newer models) unless the Claude Code client is 2.1.280 or newer. Native passthrough was forwarding old UAs such as 2.1.209 unchanged, which 400'd the request. Raise the forged pin to npm's current 2.1.280. Callers below the pin are rewritten onto that version; current or newer official CLIs still passthrough so prompt cache stays intact.
Native Claude Code detection now requires UA >= 2.1.280. Tests still using 2.1.236 were skipped for anyrouter fallback-tool injection.
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.
Anthropic now returns:
for
claude-opus-5-5(also seen with 2.1.278). The forged pin was still2.1.258, and native Claude Code passthrough forwarded the caller UA unchanged, so old CLIs 400'd.npm
@anthropic-ai/claude-codelatest is2.1.280.Changes
anthropicCLIVersion2.1.258→2.1.280cc_versionto 2.1.280Test plan
go test ./internal/app -run AnthropicClientVersion|AnthropicWireGolden|ValidAnthropicClaudeCLIUserAgent|AnthropicOAuthPreservesNative|AnthropicNativeClaudeCodeclaude-cli/2.1.209UA no longer 400s on version