mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-09-03 06:35:00 +08:00
docs(claude): clarify exact fingerprint baseline
This commit is contained in:
@@ -432,14 +432,14 @@ nonstream-keepalive-interval: 0
|
||||
# anything else is dropped so the outgoing set stays one a real client could produce.
|
||||
# Other Anthropic-compatible upstreams still forward caller betas verbatim.
|
||||
#
|
||||
# Default headers for Claude API requests. Update when Claude Code releases new versions.
|
||||
# Unconfirmed clients use this minimum CLI baseline; verified native Claude Code CLI,
|
||||
# sdk-cli, and VSCode requests preserve or may upgrade their real software fingerprint. In legacy mode,
|
||||
# user-agent/package-version/runtime-version/timeout are used as fallbacks
|
||||
# when the client omits them, while OS/arch remain runtime-derived. When
|
||||
# stabilize-device-profile is enabled, OS/arch stay pinned to the baseline values below,
|
||||
# while user-agent/package-version/runtime-version seed per-subclient software fingerprints
|
||||
# that can still upgrade independently for verified CLI and VSCode entrypoints.
|
||||
# Default headers for Claude API requests. Update only after measuring a new Claude Code release.
|
||||
# Unconfirmed clients use this CLI baseline. Verified native Claude Code CLI, sdk-cli,
|
||||
# and VSCode requests preserve their measured entrypoint and software shape only when the
|
||||
# Claude Code version, package version, and runtime version exactly match this configured
|
||||
# baseline; unmeasured versions fall back to it. In legacy mode, timeout is a fallback and
|
||||
# verified native OS/arch values remain client-supplied. When stabilize-device-profile is
|
||||
# enabled, OS/arch are pinned to the values below and cached profiles remain constrained to
|
||||
# the same exact software baseline rather than learning newer client versions.
|
||||
# claude-header-defaults:
|
||||
# user-agent: "claude-cli/2.1.220 (external, cli)"
|
||||
# package-version: "0.94.0"
|
||||
|
||||
@@ -95,11 +95,11 @@ func defaultPluginInstanceConfigNode() *yaml.Node {
|
||||
}
|
||||
}
|
||||
|
||||
// ClaudeHeaderDefaults configures default header values injected into Claude API requests.
|
||||
// In legacy mode, UserAgent/PackageVersion/RuntimeVersion/Timeout act as fallbacks when
|
||||
// the client omits them, while OS/Arch remain runtime-derived. When stabilized device
|
||||
// profiles are enabled, OS/Arch become the pinned platform baseline, while
|
||||
// UserAgent/PackageVersion/RuntimeVersion seed the upgradeable software fingerprint.
|
||||
// ClaudeHeaderDefaults configures the measured Claude Code software baseline.
|
||||
// Verified native requests preserve their entrypoint and software shape only when their
|
||||
// Claude Code, package, and runtime versions exactly match this baseline; unmeasured
|
||||
// versions use the configured values. Timeout remains a fallback. Stabilized profiles
|
||||
// also pin OS and Arch and never learn newer software versions automatically.
|
||||
type ClaudeHeaderDefaults struct {
|
||||
UserAgent string `yaml:"user-agent" json:"user-agent"`
|
||||
PackageVersion string `yaml:"package-version" json:"package-version"`
|
||||
|
||||
@@ -234,8 +234,8 @@ func pinClaudeDeviceProfilePlatform(profile, baseline ClaudeDeviceProfile) Claud
|
||||
return profile
|
||||
}
|
||||
|
||||
// normalizeClaudeDeviceProfile keeps stabilized profiles pinned to the current
|
||||
// baseline platform and enforces the baseline software fingerprint as a floor.
|
||||
// normalizeClaudeDeviceProfile pins stabilized profiles to the configured platform
|
||||
// and replaces any software tuple that does not exactly match the measured baseline.
|
||||
func normalizeClaudeDeviceProfile(profile, baseline ClaudeDeviceProfile) ClaudeDeviceProfile {
|
||||
profile = pinClaudeDeviceProfilePlatform(profile, baseline)
|
||||
if !meetsClaudeDeviceProfileBaseline(profile, baseline) {
|
||||
|
||||
Reference in New Issue
Block a user