makecindy / makecindy/cindy

feat: 模型 id 命名不规范:同一模型多写法导致 provider 路由不透明

Open
#2,207 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
2.7k
Forks
401
Avg merge
21h 48m
Merged PRs (30d)
776

Description

### 使用场景 / Use case

多 provider 配置下,为不同 Orca worker 指定不同渠道(订阅/API、不同供应商)。希望模型 id 的写法能明确、稳定地对应到具体 provider,以便按需分配 worker 的模型渠道。

当前只能靠反复实测确认某个模型写法到底路由到哪个 provider,且写法与 provider 的映射关系不可见、不可控、不稳定。

### 当前问题 / Current limitation

1. 同一模型多种写法路由到不同 provider:裸名 deepseek-v4-flash → opencode-go,deepseek/deepseek-v4-flash → xd
2. 同模型多别名并存:grok-4.5 同时有 xai/grok-4.5、x-ai/grok-4.5、裸名三种写法
3. 模型 id 实际决定 provider 路由,但用户无法显式指定 provider:opencode-go/deepseek-v4-flash 这种 "provider/模型" 写法直接返回 INVALID_PARAMS
4. list_available_models 返回聚合清单,不显示每个模型归属哪个 provider,建 worker 前无法预知路由
5. 部分写法路由不稳定:裸名 gpt-5.6-terra 曾在 woyao / openai 两个 provider 间漂移

### 期望方案 / Proposed solution

1. 统一模型 id 命名规范(如 provider/namespace/model),或明确「裸名 = 默认通道」的别名规则并去重
2. list_available_models 增加每个模型的 provider 归属字段
3. 支持显式指定 provider 的模型写法,或提供路由查询/校验接口
4. 同一模型的多别名建立等价关系文档,避免歧义

### 已考虑的替代方案 / Alternatives considered

在模型目录/文档中人工维护各写法的 provider 映射说明(需要用户自行更新,容易过时,治标不治本)。

Contributor guide

Open the contributing guide

Research direction

Start by tracing the list_available_models entry point and the model-id provider-routing logic, then reproduce the listed alias and routing examples. Define the supported naming and provider-selection behavior, including how provider ownership is exposed and validated; done requires an agreed, documented design and corresponding tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.