QuantumNous / QuantumNous/new-api

渠道没有按照优先级进行调度

Open
#6,552 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug missing reproduction steps
Dominant language
Go
Stars
48.5k
Forks
11.6k
Avg merge
1d 17h
Merged PRs (30d)
58

Description

部署来源

本仓库 Release / 官方镜像(自行部署)

您当前的 newapi 版本

v1.0.0-rc.22

提交确认
  • 非重复 issue: 我已搜索现有 Issues,确认目前没有类似 issue。
  • 提交前必读: 我已完整阅读上方“提交前必读”,并已查看文档 https://docs.newapi.ai/、项目 README 且向 AI 提问,确认这不是使用、配置或接入类问题。
  • 受支持版本: 我已提供准确的版本号、commit 或镜像标签(不是 latestunknown),并确认问题可在本仓库未修改的受支持版本中复现。
  • 非第三方服务: 我确认这不是第三方托管站、中转站、API 服务或未经本仓库原版验证的 fork 所独有的问题;第三方实例问题应联系其运营方。
  • 问题归属: 我已提供足以区分客户端、new-api 和上游的证据;转发问题已使用等价的脱敏请求对比直连上游与经过 new-api 的结果,确认错误由 new-api 引入或改变,而非仅原样转发上游报错。
  • 渠道与协议边界: 我确认问题不是由 Coding Plan、逆向渠道、第三方封装接口、Codex 反代接口,或 Codex API 自身特有行为导致;若问题最初出现于此类接口,我已在本仓库支持的标准 API 协议上复现。
  • 维护成本: 我理解项目维护者精力有限,不遵循模板要求的 issue 可能会被无视或直接关闭。
问题描述

渠道根据优先级调度,似乎有问题。
不同上游的渠道,使用同一个模型名称,其中一个渠道配置模型映射为另一个模型。
例如 期望都走渠道 A,将其配置了更高的优先级。而渠道 B作为备份,配置了模型映射。
但是,从当前实际请求结果来看,2个渠道都会被调度到,似乎并没有完全遵守优先级高低。

复现步骤
Image Image
预期结果

应该全部调度到优先级更高的渠道

相关截图

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue on v1.0.0-rc.22 using the same model name, priority settings, and model mapping shown in the screenshots. Start by tracing channel selection, priority handling, and model mapping during a request. Done means requests consistently use the higher-priority channel unless it cannot serve the request, with regression coverage for the reported setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.