mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-21 22:00:52 +08:00
fix: update Claude masquerading headers and make them configurable
Update hardcoded X-Stainless-* and User-Agent defaults to match Claude Code 2.1.44 / @anthropic-ai/sdk 0.74.0 (verified via diagnostic proxy capture 2026-02-17). Changes: - X-Stainless-Os/Arch: dynamic via runtime.GOOS/GOARCH - X-Stainless-Package-Version: 0.55.1 → 0.74.0 - X-Stainless-Timeout: 60 → 600 - User-Agent: claude-cli/1.0.83 (external, cli) → claude-cli/2.1.44 (external, sdk-cli) Add claude-header-defaults config section so values can be updated without recompilation when Claude Code releases new versions.
This commit is contained in:
@@ -156,6 +156,14 @@ nonstream-keepalive-interval: 0
|
||||
# - "API"
|
||||
# - "proxy"
|
||||
|
||||
# Default headers for Claude API requests. Update when Claude Code releases new versions.
|
||||
# These are used as fallbacks when the client does not send its own headers.
|
||||
# claude-header-defaults:
|
||||
# user-agent: "claude-cli/2.1.44 (external, sdk-cli)"
|
||||
# package-version: "0.74.0"
|
||||
# runtime-version: "v24.3.0"
|
||||
# timeout: "600"
|
||||
|
||||
# OpenAI compatibility providers
|
||||
# openai-compatibility:
|
||||
# - name: "openrouter" # The name of the provider; it will be used in the user agent and other places.
|
||||
|
||||
Reference in New Issue
Block a user