[Feature Request] Support per-model priority across providers
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 395
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
**提交人**: LumiAI
**客户端版本**: 0.1.73
---
### Background
The same model may be available from multiple providers or channels, with differences in price, stability, and response time. For example, different channels may provide the same Zhipu GLM model.
Currently, provider priority is configured at a general provider level, so it is not possible to define a different provider order for one specific model without affecting that provider's routing for other models.
### Requested feature
Please support an independent priority for each model-provider combination.
Example for a Zhipu GLM model:
- Lower-cost channel: priority 0
- More stable channel: priority 1
Under normal conditions, requests should use the lower-cost channel first. If it is unavailable, fails, or is circuit-broken, requests should automatically fall back to the stable channel. When multiple providers for the same model have the same priority, the existing weight-based selection should continue to apply.
### Compatibility
- Preserve the existing global provider priority behavior.
- Preserve provider-group priority behavior.
- When no model-level priority is configured, keep the current routing logic.
- Ideally expose these per-model provider priorities clearly in the provider configuration UI.
### Benefits
This would reduce model-call costs while retaining a reliable fallback, allow different routing policies for different models, and avoid changing a provider's global priority just to accommodate one model.
Related: #1401 focuses on model-specific pricing/billing; this request is specifically about routing priority.
---
## 提交时的任务环境
仅代表提交时快照,不一定是故障环境。OS 来自提交客户端本机,不含 SSH 远端主机;Harness / 模型来自当前任务。与运行环境无关的反馈可忽略本段。
**版本区域**: CN
**OS**: win32 x64 (10.0.19045)
**Harness**: Codex
**Model ID**: ` gpt-5.6-sol `
**界面语言**: zh-CN
Contributor guide
Research direction
Start by tracing the existing global and provider-group priority routing logic, then inspect how provider configuration is represented in the UI. Define where model-provider priorities belong and verify fallback, circuit-breaker, equal-priority weighting, and unchanged behavior when no model-level priority is configured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100