Files
claw-code/rust/crates/api
tree-zbyandtree-zby 41837f8d82 feat(api): allow hosts to add outbound headers to model requests (#3407)
Adds an optional per-client ExtraHeadersHook. Hosts that need routing, quota or cache-affinity metadata can install it with with_extra_headers_provider on AnthropicClient, OpenAiCompatClient or ProviderClient; headers are applied inside send_raw_request after the JSON body is built.

There is no global state and no behaviour change when no provider is installed. count_tokens does not go through send_raw_request, so it stays unannotated. Transport-owned headers and malformed names/values are dropped, so a broken hook cannot rewrite credentials or fail a call.

Co-authored-by: tree-zby <203675912+tree-zby@users.noreply.github.com>
2026-11-27 04:04:54 +00:00
..
2026-11-23 01:58:17 +00:00