Files
ai-kit/test
CatoandClaude Opus 5 913b16c790 feat: extraHeaders — the attribution a caller silently loses on adoption (#36)
Found converting botsmann: its OpenRouter call sends HTTP-Referer and
X-Title, which OpenRouter reads for app attribution in its public
rankings. complete() had no way to send them, so adopting the engine
would have dropped botsmann off that list with no error anywhere —
exactly the kind of small, invisible regression that makes a shared
package feel worse than the hand-rolled client it replaced.

`authorization` is merged AFTER extraHeaders and cannot be overridden. A
typo in a caller's header map must not become someone else's credential
on the wire, or an auth failure blamed on the vendor.

Both properties verified by mutation: dropping the spread turns the
attribution test red, and moving it after `authorization` turns the
override test red.


Claude-Session: https://claude.ai/code/session_01NHDLTKGirKU7He8q2YR2y4

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 22:46:19 +00:00
..