Skip to content

fix: forward vendor-specific headers through proxy#21

Open
mleungdev wants to merge 1 commit into
jgarzik:mainfrom
mleungdev:fix/proxy-forward-vendor-headers
Open

fix: forward vendor-specific headers through proxy#21
mleungdev wants to merge 1 commit into
jgarzik:mainfrom
mleungdev:fix/proxy-forward-vendor-headers

Conversation

@mleungdev
Copy link
Copy Markdown

Summary

  • Anthropic's API requires anthropic-version header on all requests — the proxy was stripping it, causing 400 errors for any Anthropic model
  • Add forwardHeaders field to VendorConfig so each vendor declares its own extra headers to forward
  • Anthropic config gets anthropic-version and anthropic-beta; all other vendors are unaffected

Test plan

  • Verify Anthropic model calls succeed through the proxy (no more anthropic-version: header is required errors)
  • Verify Google/OpenAI/other vendors still work (no regressions from the header change)
  • Run npm test in proxy/

🤖 Generated with Claude Code

Anthropic's API requires the `anthropic-version` header on all requests.
The proxy was only forwarding common headers (content-type, accept,
user-agent), causing all Anthropic model calls to fail with 400.

Add `forwardHeaders` field to VendorConfig so each vendor can declare
extra headers to forward. Anthropic gets `anthropic-version` and
`anthropic-beta`; other vendors are unaffected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants