sub2api icon indicating copy to clipboard operation
sub2api copied to clipboard

感觉分组和平台强绑定有点鸡肋,虽然有 Composite 分组,但是不同平台下的同一模型无法实现公平调度

Open yanlongqi opened this issue 2 months ago • 3 comments

如题,投票PR

yanlongqi avatar Sep 14 '26 18:09 yanlongqi

说一下你的 idea

DuskLin avatar Sep 15 '26 01:09 DuskLin

说一下你的 idea

假设我同时开通了智谱、阿里、腾讯、百度的TokenPlan,订阅里面都有 GLM 5.3 的模型,而 Composite 智能同时路由到某一个平台,而不能公平调度。 对比 new-api 里面,没有平台的概念,只有供应商的概论,同一个模型分组对可以公平调度模型。

yanlongqi avatar Sep 19 '26 16:09 yanlongqi

Hi,

I would like to propose a small, opt-in compatibility capability related to #7145: allow Composite groups to be used in RUN_MODE=simple without turning the whole instance into standard mode.

Proposed configuration:

simple_mode: composite_groups_enabled: false

When the option is false, the current simple-mode behavior must remain unchanged.

When RUN_MODE=simple and composite_groups_enabled=true, only the following capabilities would be enabled:

  • create groups with platform=composite;
  • bind accounts to Composite groups;
  • create, update, delete, and preview Composite model routes;
  • resolve Composite routes at runtime and schedule accounts within the Composite group scope.

The following simple-mode semantics should remain unchanged:

  • no balance, subscription, or user-platform quota enforcement;
  • no standard-mode rate multipliers, subscription plans, or billing controls;
  • no other standard-only advanced group features;
  • no behavior change for standard mode.

The frontend should use a server-provided composite_groups_enabled capability instead of deriving this solely from !isSimpleMode. The backend should enforce the same capability, so the feature is not enabled only by hiding or exposing UI controls.

This should not require a database migration. The default would be disabled, so existing deployments would keep their current behavior. I would add:

  • regression tests for simple mode with the flag disabled;
  • Composite CRUD and route-preview tests with the flag enabled;
  • Composite route-resolution and account-scheduling tests;
  • a regression test proving that billing remains disabled in simple mode;
  • frontend capability/UI tests.

If this direction fits the project architecture, I am willing to prepare a focused PR based on the latest main branch. Before implementing it, I would appreciate confirmation of the configuration naming and semantics.

YLeon2007 avatar Sep 20 '26 20:09 YLeon2007