feat(providers): add custom headers support to Anthropic provider#6401
Closed
trjordan wants to merge 1 commit intoblock:mainfrom
Closed
feat(providers): add custom headers support to Anthropic provider#6401trjordan wants to merge 1 commit intoblock:mainfrom
trjordan wants to merge 1 commit intoblock:mainfrom
Conversation
The Anthropic provider's `from_custom_config` method was not applying custom headers from `DeclarativeProviderConfig`, unlike the OpenAI provider which correctly applies them. This enables use cases like Portkey proxy where custom headers (e.g., `x-portkey-api-key`, `x-portkey-provider`) are required for authentication and routing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: TR Jordan <tr@tern.sh>
Collaborator
|
thanks for doing this. I noticed this is also missing from Ollama so added that here: #6774 - I'm going to continue there, so closing this one now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AnthropicProvider::from_custom_configOpenAiProvider::from_custom_configTest plan
cargo checkpassescargo test -p goose --lib anthropic- all 8 tests passcargo clippy- no new warnings🤖 Generated with Claude Code