Closed
Conversation
6 tasks
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Collaborator
|
Please sign the CLA. Thanks. @ThxCode-Chen |
CH3CHO
requested changes
Apr 2, 2026
Contributor
Author
|
/review |
Contributor
Author
I have signed the CLA, but it looks not completed yet. Can you help me check where is wrong?@CH3CHO |
Collaborator
I've re-triggered the CLA check. It looks good now. Thanks. |
CH3CHO
reviewed
Apr 3, 2026
CH3CHO
reviewed
Apr 3, 2026
Contributor
Author
|
Please help review the code. Thanks.@johnlanni @rinfx @wydream |
Collaborator
|
Please resolve conflicts. @ThxCode-Chen |
Collaborator
|
@ThxCode-Chen #3686 has already implemented the |
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.
Ⅰ. Describe what this PR did
Synchronizes the claudeCustomUrl configuration support for the Claude (Anthropic) provider in plugins/wasm-go/extensions/ai-proxy with the implementation used in the main Higress tree.
provider/provider.go: Adds the claudeCustomUrl field on ProviderConfig (with metadata comments) and parses it from JSON in FromJson.
provider/claude.go: When claudeCustomUrl is set, parses host and path (supports plain origin, path prefix, or a direct /v1/messages URL), adjusts capabilities accordingly, stores custom domain for outbound requests, and keeps the default behavior when the field is empty. TransformRequestHeaders uses the custom host when configured; otherwise it still uses resolveDomain("", claudeDomain) so providerDomain and other domain overrides keep working.
test/claude.go: Adds WASM integration-style tests for config load and for :authority being rewritten to the custom host.
Ⅱ. Does this pull request fix one issue?
No. This is a parity / sync change; there is no linked issue.
Ⅲ. Why don't you add test cases (unit test/integration test)?
Integration coverage was added in test/claude.go (plugin config + request headers). No extra unit tests were added in provider/claude_test.go because the main Higress reference implementation does not add separate CreateProvider / claudeCustomUrl unit tests there either; behavior is covered at the integration layer.
Ⅳ. Describe how to verify it
From plugins/wasm-go/extensions/ai-proxy:
go test ./provider/... ./test/... -count=1
Manually: configure a Claude provider with claudeCustomUrl (e.g. https://custom.example.com/anthropic) and confirm upstream requests use the expected Host and path for chat/messages traffic.
Ⅴ. Special notes for reviews
Interaction with providerDomain: Custom URL host wins when claudeCustomUrl is set; when it is unset, existing resolveDomain behavior is unchanged.
Capabilities: Logic matches the main repo: a direct messages endpoint only overrides message-related paths; otherwise the configured path acts as a prefix for default capability paths.
Ⅵ. AI Coding Tool Usage Checklist (if applicable)
Please check all applicable items:
[√ ] For new standalone features (e.g., new wasm plugin or golang-filter plugin):
design/directory in the plugin folderdesign/directoryFor regular updates/changes (not new plugins):
AI Coding Prompts (for regular updates)
AI Coding Summary