fix(claude): restore legacy runtime OS arch fallback

This commit is contained in:
tpob
2026-03-19 00:01:50 +08:00
parent e0e337aeb9
commit 616d41c06a
5 changed files with 98 additions and 7 deletions

View File

@@ -128,8 +128,10 @@ type Config struct {
legacyMigrationPending bool `yaml:"-" json:"-"`
}
// ClaudeHeaderDefaults configures default header values injected into Claude API requests
// when the client does not send them. Update these when Claude Code releases a new version.
// 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, all of these values seed the baseline pinned fingerprint.
type ClaudeHeaderDefaults struct {
UserAgent string `yaml:"user-agent" json:"user-agent"`
PackageVersion string `yaml:"package-version" json:"package-version"`