mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
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.