fix(auth): add oauth-2025-04-20 beta header + debug logging
Ensure anthropic-beta includes oauth-2025-04-20 when using OAuth tokens, fixing 401 "OAuth authentication is currently not supported" errors. Add debug-level logging for upstream requests/responses, sniffed headers, and token refresh operations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -122,6 +122,11 @@ func SniffClaudeCode(claudeBinary string) (*SniffedProfile, error) {
|
||||
Int("headers", len(profile.Headers)).
|
||||
Int("body_size", len(profile.Body)).
|
||||
Msg("sniffed claude-code profile")
|
||||
|
||||
for _, h := range profile.Headers {
|
||||
log.Debug().Str("header", h[0]).Str("value", h[1]).Msg("sniffed header")
|
||||
}
|
||||
|
||||
return profile, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user