fix: address review feedback — restore V3 as legacy, fix zai base_url

- Restore deepseek-chat-v3-0324 and deepseek-reasoner with '(legacy)' labels;
  these are deprecated 2026-07-24 but still live until then
- Fix zai (Z.AI/GLM) default_base_url: use /api/paas/v4 instead of /api/coding/paas/v4;
  the coding plan path is for the glmcode custom provider, not the general API
- Update test assertions to match
This commit is contained in:
fxd-jason authored and Hermes Agent committed 2026-04-29 04:31:16 +00:00
1 parent 544d5222a1
commit 26f51b7190
5 files changed
+16 -11

No files matched your search

+4
View File
@@ -503,6 +503,8 @@ _FALLBACK_MODELS = [
# DeepSeek
{"provider": "DeepSeek", "id": "deepseek/deepseek-v4-flash", "label": "DeepSeek V4 Flash"},
{"provider": "DeepSeek", "id": "deepseek/deepseek-v4-pro", "label": "DeepSeek V4 Pro"},
{"provider": "DeepSeek", "id": "deepseek/deepseek-chat-v3-0324", "label": "DeepSeek V3 (legacy)"},
{"provider": "DeepSeek", "id": "deepseek/deepseek-r1", "label": "DeepSeek R1 (legacy)"},
# Qwen (Alibaba) — strong coding and general models
{"provider": "Qwen", "id": "qwen/qwen3-coder", "label": "Qwen3 Coder"},
{"provider": "Qwen", "id": "qwen/qwen3.6-plus", "label": "Qwen3.6 Plus"},
@@ -655,6 +657,8 @@ _PROVIDER_MODELS = {
"deepseek": [
{"id": "deepseek-v4-flash", "label": "DeepSeek V4 Flash"},
{"id": "deepseek-v4-pro", "label": "DeepSeek V4 Pro"},
{"id": "deepseek-chat-v3-0324", "label": "DeepSeek V3 (legacy)"},
{"id": "deepseek-reasoner", "label": "DeepSeek Reasoner (legacy)"},
],
"nous": [
{"id": "@nous:anthropic/claude-opus-4.6", "label": "Claude Opus 4.6 (via Nous)"},
+1 -1
View File
@@ -112,7 +112,7 @@ _SUPPORTED_PROVIDER_SETUPS = {
"label": "Z.AI / GLM (智谱)",
"env_var": "GLM_API_KEY",
"default_model": "glm-5.1",
"default_base_url": "https://open.bigmodel.cn/api/coding/paas/v4",
"default_base_url": "https://open.bigmodel.cn/api/paas/v4",
"requires_base_url": False,
"models": list(_PROVIDER_MODELS.get("zai", [])),
"category": "specialized",
+1
View File
@@ -381,6 +381,7 @@
<option value="google/gemini-3-flash-preview">Gemini 3 Flash Preview</option>
<option value="deepseek/deepseek-v4-flash">DeepSeek V4 Flash</option>
<option value="deepseek/deepseek-v4-pro">DeepSeek V4 Pro</option>
<option value="deepseek/deepseek-chat-v3-0324">DeepSeek V3 (legacy)</option>
<option value="meta-llama/llama-4-scout">Llama 4 Scout</option>
</optgroup>
</select>
+1 -1
View File
@@ -701,7 +701,7 @@ function getModelLabel(modelId){
// Check dynamic labels first, then fall back to splitting the ID
if(_dynamicModelLabels[modelId]) return _dynamicModelLabels[modelId];
// Static fallback for common models
const STATIC_LABELS={'openai/gpt-5.4-mini':'GPT-5.4 Mini','openai/gpt-4o':'GPT-4o','openai/o3':'o3','openai/o4-mini':'o4-mini','anthropic/claude-sonnet-4.6':'Sonnet 4.6','anthropic/claude-sonnet-4-5':'Sonnet 4.5','anthropic/claude-haiku-3-5':'Haiku 3.5','google/gemini-3.1-pro-preview':'Gemini 3.1 Pro','google/gemini-3-flash-preview':'Gemini 3 Flash','google/gemini-3.1-flash-lite-preview':'Gemini 3.1 Flash Lite','google/gemini-2.5-pro':'Gemini 2.5 Pro','google/gemini-2.5-flash':'Gemini 2.5 Flash','deepseek/deepseek-v4-flash':'DeepSeek V4 Flash','deepseek/deepseek-v4-pro':'DeepSeek V4 Pro','meta-llama/llama-4-scout':'Llama 4 Scout'};
const STATIC_LABELS={'openai/gpt-5.4-mini':'GPT-5.4 Mini','openai/gpt-4o':'GPT-4o','openai/o3':'o3','openai/o4-mini':'o4-mini','anthropic/claude-sonnet-4.6':'Sonnet 4.6','anthropic/claude-sonnet-4-5':'Sonnet 4.5','anthropic/claude-haiku-3-5':'Haiku 3.5','google/gemini-3.1-pro-preview':'Gemini 3.1 Pro','google/gemini-3-flash-preview':'Gemini 3 Flash','google/gemini-3.1-flash-lite-preview':'Gemini 3.1 Flash Lite','google/gemini-2.5-pro':'Gemini 2.5 Pro','google/gemini-2.5-flash':'Gemini 2.5 Flash','deepseek/deepseek-v4-flash':'DeepSeek V4 Flash','deepseek/deepseek-v4-pro':'DeepSeek V4 Pro','deepseek/deepseek-chat-v3-0324':'DeepSeek V3 (legacy)','meta-llama/llama-4-scout':'Llama 4 Scout'};
if(STATIC_LABELS[modelId]) return STATIC_LABELS[modelId];
// Safe Ollama-tag fallback formatter before generic split('/').pop()
let _last = modelId.split('/').pop() || modelId;
+9 -9
View File
@@ -226,20 +226,20 @@ class TestDeepSeekV4Models:
"""Verify DeepSeek V4 models are in the model lists, V3 is removed."""
def test_v4_models_in_provider_models(self):
"""_PROVIDER_MODELS['deepseek'] should contain v4-flash and v4-pro only."""
"""_PROVIDER_MODELS['deepseek'] should contain v4 and legacy v3 entries."""
from api.config import _PROVIDER_MODELS
ds_models = _PROVIDER_MODELS.get("deepseek", [])
ids = {m["id"] for m in ds_models}
assert "deepseek-v4-flash" in ids, f"v4-flash missing from deepseek models: {ids}"
assert "deepseek-v4-pro" in ids, f"v4-pro missing from deepseek models: {ids}"
assert "deepseek-v4-flash" in ids, f"v4-flash missing: {ids}"
assert "deepseek-v4-pro" in ids, f"v4-pro missing: {ids}"
# V3 / legacy models should be gone
assert "deepseek-chat-v3-0324" not in ids, (
f"deprecated V3 should not be in model list: {ids}"
# Legacy models still present (deprecated 2026-07-24, not yet removed)
assert "deepseek-chat-v3-0324" in ids, (
f"V3 legacy should remain until deprecation date: {ids}"
)
assert "deepseek-reasoner" not in ids, (
f"deprecated reasoner should not be in model list: {ids}"
assert "deepseek-reasoner" in ids, (
f"Reasoner legacy should remain until deprecation date: {ids}"
)
def test_zai_models_include_glm_series(self):
@@ -265,7 +265,7 @@ class TestDeepSeekV4Models:
assert zai["label"] == "Z.AI / GLM (智谱)"
assert zai["env_var"] == "GLM_API_KEY"
assert zai["default_model"] == "glm-5.1"
assert zai["default_base_url"] == "https://open.bigmodel.cn/api/coding/paas/v4"
assert zai["default_base_url"] == "https://open.bigmodel.cn/api/paas/v4"
def test_deepseek_onboarding_default_is_v4(self):
"""DeepSeek onboarding default should be v4-flash, not V3."""