Repository navigation
Conversation
The Ali (type 17) adapter sent /v1/responses to
/api/v2/apps/protocols/compatible-mode/v1/responses, a path not served by
direct MaaS hosts (e.g. Aliyun Token Plan). Upstream returns
{"code":"InternalError","message":"No gRPC response received"} (HTTP 500)
for every model on that path, while /v1/chat/completions and /v1/messages
on the same channel work fine.
Route Responses to /compatible-mode/v1/responses, parallel to the existing
chat endpoint /compatible-mode/v1/chat/completions — the OpenAI-compatible
base documented at https://help.aliyun.com/zh/model-studio/base-url.
Verified on a Token Plan host: deepseek-v4-pro-0813 and qwen3.8-max both
return HTTP 200 on the new path (qwen not regressed).
Co-Authored-By: Claude <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughThe relay adapter changes the ChangesResponses endpoint routing
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change routes Alibaba Responses requests to the compatible endpoint that returns successful Responses objects instead of the failing path. No actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
不支持token plan |
📝 变更描述 / Description
阿里云(type 17)适配器把
/v1/responses路由到/api/v2/apps/protocols/compatible-mode/v1/responses(commit5b3c8e84引入)。该路径在直连 MaaS host(如阿里云 Token Plan)上不被服务,阿里云对所有模型返回{"code":"InternalError","message":"No gRPC response received"}(HTTP 500),而同一渠道的/v1/chat/completions、/v1/messages正常工作。改为
%s/compatible-mode/v1/responses,与同文件 chat 端点%s/compatible-mode/v1/chat/completions对齐——这是阿里云文档(https://help.aliyun.com/zh/model-studio/base-url)所列 Token Plan OpenAI-compatible base 下的 responses 端点。实测验证(Token Plan host + 真实渠道 key)
apps/protocols/.../responsesNo gRPC response receivedcompatible-mode/v1/responsescompatible-mode/v1/responses5b3c8e84针对的 qwen3-max 不会受影响)go build/go vet/go test ./relay/channel/ali/通过。🚀 变更类型 / Type of change
🔗 关联任务 / Related Issue
✅ 提交前检查项 / Checklist
relay/channel/ali/adaptor.go一行 + 注释📸 运行证明 / Proof of Work
见上方实测表格:旧路径复现 500
No gRPC response received,新路径返回 200 正常 Responses 对象。Summary by CodeRabbit