You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add extra_headers support to all client methods (#193)
* feat: add extra_headers support to all client methods (#178)
Add `extra_headers: dict[str, str] | None = None` alongside `extra_body`
on all client methods, enabling users to pass provider-specific HTTP
headers (e.g., Anthropic's 1M context beta header).
- Extend `_json_headers()` to accept and merge extra headers
- Add `_merge_headers()` static helper for edge cases (WebSocket, multipart)
- Thread `extra_headers` through `_predict()` → `_make_request()` and
`_stream()` → `_make_stream_request()` across all providers
- Update all 3 templates and the template contract test
Closes#178
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: improve extra_headers consistency across all providers
- Make _merge_headers return a new dict instead of mutating input
- Add extra_headers to base _make_stream_request stub signature
- Fix OpenAI videos multipart sending wrong Content-Type
- Add extra_headers to Google _get_interaction and download_content
- Simplify BFL header construction to use _json_headers(extra_headers)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments