refactor(models): unify provider metadata around backend catalog (#2896)
* feat(models): unify provider metadata around backend catalog - Move shared provider metadata and alias normalization into backend-owned provider catalog - Expose display, fetch, auth, and default model metadata through /api/models provider_options - Replace frontend static provider registry with catalog-driven selection, validation, grouping, and fallback rendering - Treat provider default api_base as placeholder and effective fetch/test base while keep submitted api_base separate from derived defaults - Add model page retry handling, touched locale updates, and provider metadata assertions in backend tests * fix(models): canonicalize backend provider aliases and common models * fix(models): restore deepseek common model recommendations
This commit is contained in:
28 files changed
+1441
-1084
No files matched your search
@@ -65,9 +65,7 @@ func TestNormalizeProvider(t *testing.T) {
|
||||
{"z.ai", "zai"},
|
||||
{"z-ai", "zai"},
|
||||
{"Z.AI", "zai"},
|
||||
{"opencode-zen", "opencode"},
|
||||
{"qwen", "qwen-portal"},
|
||||
{"kimi-code", "kimi-coding"},
|
||||
{"gpt", "openai"},
|
||||
{"claude", "anthropic"},
|
||||
{"glm", "zhipu"},
|
||||
@@ -79,9 +77,11 @@ func TestNormalizeProvider(t *testing.T) {
|
||||
{"codexcli", "codex-cli"},
|
||||
{"copilot", "github-copilot"},
|
||||
// Alibaba Coding Plan aliases
|
||||
{"alibaba-coding", "coding-plan"},
|
||||
{"qwen-coding", "coding-plan"},
|
||||
{"alibaba-coding-anthropic", "coding-plan-anthropic"},
|
||||
{"alibaba-coding", "alibaba-coding"},
|
||||
{"coding-plan", "alibaba-coding"},
|
||||
{"qwen-coding", "alibaba-coding"},
|
||||
{"alibaba-coding-anthropic", "alibaba-coding-anthropic"},
|
||||
{"coding-plan-anthropic", "alibaba-coding-anthropic"},
|
||||
// Qwen international aliases
|
||||
{"qwen-international", "qwen-intl"},
|
||||
{"dashscope-intl", "qwen-intl"},
|
||||
|
||||
Reference in new issue
Block a user