fix: normalize Anthropic header keys to lowercase in provider registry (#1527)

The provider registry used PascalCase header keys (e.g. "Anthropic-Version")
while the Claude Code client path in base.ts sets lowercase keys
("anthropic-version"). Since JS object keys are case-sensitive, both keys
coexist in the headers object. When fetch() sends them, HTTP treats them
as duplicates and concatenates the values ("2023-06-01, 2023-06-01"),
causing Anthropic's API to reject the request with a 400 error.

Normalize all Anthropic-specific header keys to lowercase to match the
convention used in executors and the upstream API.
This commit is contained in:
Prakersh Maheshwari
2026-04-24 17:34:24 +05:30
committed by GitHub
parent 5b8e41c1b2
commit 1b84c04dcd

Diff Content Not Available