router-for-me / router-for-me/EasyCLIProxyAPI

功能建议:用"模型分组"(类 Octopus 的一屏式管理)取代分散在各渠道里的"模型别名"

Open
#215 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2.3k
Forks
187
Avg merge
8m
Merged PRs (30d)
50

Description

目前想让多个渠道的模型对外共用一个名字,靠的是在每个渠道的 models 里手写 alias。以我的真实配置为例——我只是想让客户端统一调用 glm-5.3-flash 和 deepseek-v4-flash,后台在 4 个渠道之间自动故障转移。

现状痛点
心智模型是反的:我脑子里的结构是"模型 → 有哪些来源",配置却是"渠道 → 这个模型又叫什么名"。想回答"调用 glm-5.3-flash 到底会落到哪几个渠道",得把整个 config 翻一遍 grep。
没有总览:同一个别名出现在多少个渠道、有没有漏配,界面上完全看不出来。文档还专门警告"重叠的客户端可见名可能产生歧义"——但重叠恰恰是故障转移用法的本意,配置层面却无法直观表达"这几个就是一组"。
容易静默出错:在渠道里添加模型时 alias 靠手打,打错一个字母不报错,只是 /v1/models 里多出一个孤立模型名,请求静默地不再进同一个池子,很难排查。
组内优先级不可见:fill-first 策略下先打谁,取决于渠道块在配置里的排列顺序,想调整就得挪渠道块,而且没有地方能看到"这个别名下的优先级链"。
改动成本高:新增渠道想加入既有池子,要打开该渠道的模型编辑器、凭记忆手输 alias;改名时同样要挨个渠道改。
建议:参照 Octopus 的"分组"页做一屏式管理
Octopus 的分组页(见截图):

Image

一张卡片就是一个对外模型名(分组名 = 客户端看到的模型名,如 deepseek-v4-flash、glm-5.3-flash、kimi-k3),页面顶部有搜索/筛选/新建,每张卡片带编辑、复制、删除。
卡片里一行 = 一个成员 = 渠道 · 账号 · 上游模型名,例如:
DeepSeek-V4-Flash-Vision-Exp(amd · ****)
z-ai/glm-5.3-flash(cline · default)
kimi-k3(sensenova · ****)
成员行带拖拽手柄,卡片内的排列顺序就是组内优先级(配合 fill-first 即故障转移顺序),拖一下就改;× 一点就移除成员;
右上角 + 新建分组,从渠道/账号/模型选择器里把成员加进来,全程不用手写 alias 字符串。
这样一个页面就能回答我日常全部的运维问题:这个模型有哪些来源?哪个渠道该往前挪?新渠道怎么进池子?某个账号挂了想临时摘掉——点个 × 就行。

实现建议(降低接受门槛)
分组可以先作为 GUI 层的重新呈现:底层复用现有 alias 机制——分组名 = alias,卡片成员 = 各渠道里拥有该 alias 的 models 条目,拖拽排序映射为组内凭证顺序/权重。零破坏、老配置无缝兼容,实现成本主要在前端。
首次升级做一次自动迁移展示:把现有相同 alias 的条目自动折叠成卡片,用户打开就能看到自己当前的"隐性分组"。
若后续愿意动内核,再考虑引入一等 groups 结构(组名 → 成员列表[渠道, 账号, 上游模型, 权重]),alias 保留向后兼容、自动转换。
分组卡片上顺手放每成员的启停开关(对应渠道 disabled),排障时临时摘除某个来源是高频操作。
环境
EasyCLIProxyAPI v0.2.71(Windows amd64,内核 CLIProxyAPI 7.2.151)

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

No source files or tests are named. Start by tracing how channel model aliases are represented and edited in the GUI, then inspect how /v1/models and fill-first ordering use them. Done means a group-management view can discover existing aliases, manage channel members and priority, and preserve compatibility with current configurations.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.