fix: 修正火山方舟(VolcEngine)渠道获取模型列表端点路径 404 - #7203
Conversation
VolcEngine (type=45) 渠道 fetch models 时拼接 {base}/v1/models,
但火山方舟 OpenAI 兼容 API 根路径是 /api/v3,不存在 /v1/models,
导致「获取模型列表」固定返回 404。改为 {base}/api/v3/models。
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team 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 VolcEngine fallback model-list URL now uses ChangesVolcEngine model listing
Estimated code review effort: 2 (Simple) | ~5 minutes Merge Risk: ⚪ Minimal · up to VolcEngine model discovery now uses the API v3 endpoint instead of the previously failing v1 path, while custom OpenAI-compatible base URLs retain their existing behavior. No merge-blocking risk remains. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
|
火山支持获取模型列表了?文档发来看看 |
|
确实支持了,火山史诗级更新 |
- 064ed94 feat(billing): 支持按请求固定的表达式计价 - 7cf9b47 fix(web): 保持模型定价内容在单一滚动区域内 - a205741 fix(alibaba): 修正 Wan 模型协议与用量统计 - 12be997 fix(web): 统一服务端错误通知 - d52bdc0 feat(billing): 新增基于时间的定价编辑器与表达式预览 - 876903a fix: 修正火山方舟渠道获取模型列表的端点路径 (QuantumNous#7203) - c79b74b fix(frontend): 去重 /api/status 请求 (QuantumNous#7189) - 4fc9d1f fix(options): 重建 options 表主键,防止定价写入重置已有行 - 9bf328d fix: 在 Sora 视频查询中保留 provider 字段
问题描述
火山方舟(VolcEngine, type=45)渠道点击「获取模型列表」(
GET /api/channel/fetch_models/:id→fetchChannelUpstreamModelIDs)固定失败,前端报错获取模型列表失败: status code: 404。根因
fetchChannelUpstreamModelIDs对 VolcEngine 拼接的模型列表 URL 是{baseURL}/v1/models:但火山方舟的 OpenAI 兼容 API 根路径是
/api/v3(同一仓库relay/channel/volcengine/adaptor.go的GetRequestURL中 chat/embeddings/images 均为{base}/api/v3/...),上游不存在/v1/models端点,因此固定 404。实测(真实渠道 API Key 直连上游):
https://ark.cn-beijing.volces.com/v1/modelshttps://ark.cn-beijing.volces.com/api/v3/models{"data":[{"id":"..."}]}修复
将 VolcEngine 分支的模型列表 URL 改为
{baseURL}/api/v3/models。上游/api/v3/models返回体与OpenAIModelsResponse/parseOpenAIModelIDs完全兼容,无需其他改动。(
ChannelSpecialBases的自定义 OpenAIBaseURL 分支保持原样未动,避免引入未经验证的变更。)验证
本地按此补丁构建镜像后,火山方舟渠道「获取模型列表」成功拉取到账号全部有权限的 doubao/seed 模型;推理链路(
/api/v3/chat/completions)不受影响。影响面
仅影响 VolcEngine 渠道的"获取模型列表/上游模型巡检"功能(该功能 404 失败本身无副作用,不会清空已配置模型)。其它渠道不受影响。
Summary by CodeRabbit