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

@@ -855,8 +855,8 @@ func applyClaudeHeaders(r *http.Request, auth *cliproxyauth.Auth, apiKey string,
r.Header.Set("Accept", "application/json")
r.Header.Set("Accept-Encoding", "gzip, deflate, br, zstd")
}
// Keep OS/Arch mapping dynamic (not configurable).
// They intentionally continue to derive from runtime.GOOS/runtime.GOARCH.
// Legacy mode keeps OS/Arch runtime-derived; stabilized mode may pin
// the full device profile from the cached or configured baseline.
var attrs map[string]string
if auth != nil {
attrs = auth.Attributes