fix: support Anthropic-native API format through keyring proxy#11
Closed
djangobits wants to merge 1 commit intojgarzik:mainfrom
Closed
fix: support Anthropic-native API format through keyring proxy#11djangobits wants to merge 1 commit intojgarzik:mainfrom
djangobits wants to merge 1 commit intojgarzik:mainfrom
Conversation
The proxy only accepted Bearer token auth and used a single path construction strategy, which broke when OpenClaw used the native Anthropic Messages API format (x-api-key header, /v1/messages paths). - Accept x-api-key header for bot auth (Anthropic SDK sends keys this way instead of Authorization: Bearer) - Avoid doubling /v1 basePath when the client SDK already includes it - Add anthropic-version header and /responses to /messages path translation for OpenAI-compat mode - Use vendor-native API format in bot templates (anthropic-messages for Anthropic, google-generative-ai for Google) instead of hardcoded openai-responses Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
Closing: all fixes in this PR were independently addressed by upstream in PR #10 (with different but equivalent approaches). No additional changes needed. |
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
x-api-keyheader in proxy for Anthropic-native bot auth (in addition toAuthorization: Bearer)/v1/v1/messages) when Anthropic SDK includes basePath in requestsanthropic-versionheader and/responses→/messagespath translationanthropic-messagesfor Anthropic,google-generative-aifor Google) instead of hardcodedopenai-responsesTest plan
🤖 Generated with Claude Code