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(anthropic): add include_response_headers parameter to ChatAnthropic
This change adds support for include_response_headers parameter to ChatAnthropic,
providing feature parity with ChatOpenAI. When set to True, HTTP response headers
are included in the response_metadata of AI messages.
- Add include_response_headers parameter to ChatAnthropic class
- Implement _create_with_raw_response and _acreate_with_raw_response methods
- Update _generate, _agenerate, _stream, and _astream methods to handle headers
- Modify _format_output to conditionally include headers in response_metadata
- Add comprehensive unit and integration tests
- Maintain backward compatibility by only setting headers when present
🤖 Generated with Claude Code
Co-Authored-By: Claude <[email protected]>
0 commit comments