Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(anthropic): add support for custom HTTP headers in Anthropic API #2343

Merged

Conversation

tzolov
Copy link
Contributor

@tzolov tzolov commented Feb 27, 2025

Add the ability to specify custom HTTP headers for Anthropic API requests through AnthropicChatOptions. This allows users to override or add headers for authentication, tracking, or other API-specific requirements.

  • Add httpHeaders field to AnthropicChatOptions with appropriate getters/setters
  • Implement header merging between default and runtime options
  • Update AnthropicApi to accept additional HTTP headers in API calls
  • Add integration test demonstrating API key override via custom headers
  • Update documentation with the new configuration property

Resolves #2335

… requests

Add the ability to specify custom HTTP headers for Anthropic API requests through AnthropicChatOptions.
This allows users to override or add headers for authentication, tracking, or other API-specific requirements.

- Add httpHeaders field to AnthropicChatOptions with appropriate getters/setters
- Implement header merging between default and runtime options
- Update AnthropicApi to accept additional HTTP headers in API calls
- Add integration test demonstrating API key override via custom headers
- Update documentation with the new configuration property

Resolves spring-projects#2335

Signed-off-by: Christian Tzolov <[email protected]>
@tzolov tzolov added this to the 1.0.0-M7 milestone Feb 27, 2025
@sobychacko sobychacko self-assigned this Feb 27, 2025
@sobychacko sobychacko merged commit 041d94f into spring-projects:main Feb 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need HTTP header support for Anthropic
2 participants