Repository navigation
Closed as not planned
Labels
invalidThis doesn't seem right
Description
Agent
- Tool: Codex,AI 辅助排查与实现
- Tool version: 本机 codex-cli 0.160.0;通过 gh 2.103.3 提交
- Model (full id): 会话未暴露完整 ID,不作推测
- Host (CLI / IDE / GitHub coding agent / other): Codex desktop / Linux 执行环境
- Date (UTC): 2026-11-06
User request
技术目标:修正百炼文本模型的协议目录漏标,保留必要的复现步骤、修复说明和验证结果。
Out of scope — refuse
- Matched: no。报告本仓库生成的目录标签,不是上游转发、套餐、透传或第三方托管问题。
- If yes, what was told to the user: 不适用。
File gate — do not file unless all are satisfied
- Out of scope (including pass-through): no
- Usage / configuration / integration (answered instead of filing): no
- Required facts present without invention: yes;截图、目录接口及渠道推断代码可核对。
- Body is short and factual; no unfiltered AI-generated text: yes
- File: yes
- If no, what was told to the user: 不适用。
Kind
- Bug
- Feature
- Investigation
- Other
Usage / configuration / integration check
- https://docs.newapi.ai/ — 查阅渠道与模型管理入口;自定义端点可绕过漏标,不能修复默认推断。
- https://deepwiki.com/QuantumNous/new-api — 查阅 Model & Pricing Management,目录来自渠道能力与模型元数据。
- README / repo docs: README.zh_CN.md 的协议表与开发约定。
- Relevant code paths and conclusion: common/endpoint_type.go 未处理 Ali;model/pricing.go 将推断结果作为 supported_endpoint_types。
- Can the current version already do this?: Ali 适配器已实现 Responses;本报告不是新增推理协议。
- Verdict: 服务端模型目录漏标。
Environment
- new-api version / commit / image tag: calciumion/new-api:v1.0.0-rc.45;另核对 rc.48 与 main 基线 2de51a1 的推断代码,均缺 Ali 分支。
- Deploy source: 官方镜像,自托管。
- Database: PostgreSQL。
Problem facts
- Actual behavior: 选择 Response 后用户截图仅显示 4 个非千问模型;目录中 qwen3.8-flash、qwen3.7-max 等缺少 openai-response。
- Impact: 按协议找模型会遗漏百炼千问。
- Frequency: 用户截图与排查期间多次 GET /api/pricing 均复现;不声称所有实例都只显示 4 个模型。
- Evidence that the problem is in new-api rather than the client or upstream: 缺标已存在于成功返回的目录 JSON;Ali 渠道在本地推断函数中落入默认分支,无需上游请求或浏览器即可定位。
Type-specific details
Relay / API
不适用:不是 relay 失败报告。涉及 GET /api/pricing,Ali(17),qwen3.8-flash、qwen3.7-max。未发起上游推理,不主张已验证完整协议功能。
Billing
不适用:无计费、usage 或扣费问题。
Frontend
- Page path: /pricing
- Browser and version: macOS Chrome,用户未提供完整版本;curl 可独立复现。
- Active theme: 用户截图为浅色。
- Relevant browser Console / Network errors: 用户未检查;后端返回成功但缺标签。
Deployment / upgrade
不适用:未做升级或迁移;Linux x86_64、Docker、PostgreSQL,线上仍为 rc.45。
Reproduction and expected result
- Steps to reproduce: 配置 Ali 渠道与 qwen3.8-flash,不设置模型自定义 endpoints;读取 /api/pricing 的 supported_endpoint_types;模型广场选择 Response。
- Expected result: 已支持的文本模型应包含标准 openai-response,保留 Chat;不误标图片、音频、嵌入、重排模型。
- Related screenshots: 用户已提供 Response 4、阿里巴巴供应商 8 的截图;未上传公开图床。
Feature (feature requests only)
不适用,修正已有协议的目录标签。
Duplicate check
- Search queries: repo:QuantumNous/new-api "supported_endpoint_types";"百炼" "Responses";"GetEndpointTypesByChannelType",搜索 issues 与 PR。
- Closest existing threads: Bug: /v1/responses 对 DashScope 百炼模型返回 convert_request_failed #4535、渠道类型 选择 阿里通义千问时,responses类型的端点不能访问 #6219、[Feature] /api/pricing 返回模型能力标签与上下文长度元数据 #5931、fix(ali): route Responses to compatible-mode endpoint #7013。
- Why this is not a duplicate: 分别讨论旧版转发失败、URL、额外模型能力字段;本报告仅针对目录推断。
Research
Docs
- https://docs.newapi.ai/zh/docs :渠道、模型与接口说明入口。
- https://deepwiki.com/QuantumNous/new-api/5-user-and-token-management :模型目录机制。
- README / other repo docs: README.zh_CN.md、AGENTS.md、.agents/github/ISSUE.md。
- Conclusions: https://help.aliyun.com/zh/model-studio/qwen-api-via-openai-responses 已列出上述千问文本模型。
Code
- common/endpoint_type.go — Ali 无专门分支,普通千问只推断 openai。
- model/pricing.go — 合并渠道推断与可选模型端点。
- web/src/features/pricing/lib/filters.ts — 精确匹配 openai-response。
- relay/channel/ali/adaptor.go — 已实现 /compatible-mode/v1/responses 与 Messages 处理。
Experiments
- Command or redacted request:
curl -fsS http://127.0.0.1:37321/api/pricing | jq '[.data[] | select(.model_name == "qwen3.8-flash") | {model_name,supported_endpoint_types}]' - Direct upstream result: 未调用;缺陷发生在目录生成。
- Result through new-api: HTTP 200,qwen3.8-flash 为 ["openai","anthropic"],没有 openai-response;anthropic 来自另一个已配置渠道。
- Conclusion: 目录缺标,不是浏览器或上游返回的错误。
Working theory
- What is broken or missing: Ali 文本模型的 Responses 端点推断。
- Why: 已实现的适配器能力没有同步到目录推断。
- What would falsify this: 纯 Ali、无自定义端点的上述模型能自动返回 openai-response。
Scope
- In scope for a later PR: 补齐已知百炼文本模型族的标准端点标签和回归测试。
- Out of scope / not this repo: 自定义标签改名、上游能力、透传、计费、部署、数据库迁移。
- Large or directional feature?: no。
Proposed direction
受支持的文本模型可被 Response 筛选,Chat 保留;非文本模型与无关渠道不误增标签。
Not verified
未验证上游推理、各模型的高级工具能力、所有地域;Chrome 完整版本未知;未升级线上实例。
Related
Metadata
Metadata
Assignees
Labels
invalidThis doesn't seem right
Activity
new-api-reviewer-bot commentedon Nov 6, 2026
[Bot Review]
感谢提交。我们发现该 Issue 未使用仓库标准的 Bug 或 Feature 模板提交(缺少“版本/version”、“提交确认/Submission Checks”等必需段落)。为了便于维护团队快速定位和处理问题,请使用官方提供的模板并完整填写相关信息重新提交。当前 Issue 将被关闭,期待您的规范重提!
AyuDeng commentedon Nov 6, 2026
补充说明:本 Issue 按仓库 AGENTS.md 的要求使用 .agents/github/ISSUE.md 代理模板,而非普通 Bug 表单。版本在 Environment,目录接口返回与源码定位在 Experiments。修复 PR 已提交:#8233,包含修复前失败、修复后通过的回归验证。请维护者核查代理模板与机器人的模板校验规则是否一致;本报告仅涉及模型目录协议漏标,不涉及上游调用失败、透传或套餐服务。
fix(models): preserve overflow selections and guard discovery transac…
Merge pull request #107 from soulteary/feat/model-import-governance
Merge pull request #109 from soulteary/docs/community-improvements