Skip to content

fix(ai-proxy): update anthropic messages endpoint path for qwen provider#3530

Merged
rinfx merged 1 commit intohigress-group:mainfrom
Jing-ze:update-qwen-anthropic
Feb 25, 2026
Merged

fix(ai-proxy): update anthropic messages endpoint path for qwen provider#3530
rinfx merged 1 commit intohigress-group:mainfrom
Jing-ze:update-qwen-anthropic

Conversation

@Jing-ze
Copy link
Copy Markdown
Collaborator

@Jing-ze Jing-ze commented Feb 24, 2026

Ⅰ. Describe what this PR did

Update the Qwen provider's Anthropic-compatible API endpoint from the legacy path /api/v2/apps/claude-code-proxy/v1/messages to the new official path /apps/anthropic/v1/messages. The new endpoint (/apps/anthropic) as documented in the Bailian Anthropic API compatibility documentation.

Ⅱ. Does this pull request fix one issue?

N/A

Ⅲ. Why don't you add test cases (unit test/integration test)?

This is a one-line constant change (URL path string).

Ⅳ. Describe how to verify it

curl -X POST "https://dashscope.aliyuncs.com/apps/anthropic/v1/messages" \
  -H "Content-Type: application/json" \
  -H "x-api-key: ${DASHSCOPE_API_KEY}" \
  -d '{"model":"qwen-plus","max_tokens":100,"messages":[{"role":"user","content":"Say hello"}]}'

Ⅴ. Special notes for reviews

  • Only the qwenAnthropicMessagesPath constant is changed. No logic changes.

Ⅵ. AI Coding Tool Usage Checklist (if applicable)

Please check all applicable items:

  • For regular updates/changes (not new plugins):
    • I have provided the prompts/instructions I gave to the AI Coding tool below
    • I have included the AI Coding summary below

AI Coding Prompts (for regular updates)

AI Coding Summary

  • Key decision: Only the URL path constant needed updating; the auth, host, and protocol handling logic are all path-agnostic.
  • Major change: qwenAnthropicMessagesPath changed from /api/v2/apps/claude-code-proxy/v1/messages to /apps/anthropic/v1/messages in provider/qwen.go.
  • Verification: Live-tested through a Higress gateway with the compiled WASM plugin against real Dashscope API, confirming streaming, thinking mode, system prompts, and multiple auth methods all work correctly with the new endpoint.

Change-Id: I4f0b19325370b5c3ae2639752e5b1b6abe5c1686
Co-developed-by: Qoder <noreply@qoder.com>
Copy link
Copy Markdown
Collaborator

@rinfx rinfx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rinfx rinfx merged commit e9aecb6 into higress-group:main Feb 25, 2026
17 checks passed
daixijun pushed a commit to daixijun/higress that referenced this pull request Mar 11, 2026
Libres-coder pushed a commit to Libres-coder/higress that referenced this pull request Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants