diff --git a/backend/app/model/model_platform.py b/backend/app/model/model_platform.py index 94ca0d918..2e81cef7a 100644 --- a/backend/app/model/model_platform.py +++ b/backend/app/model/model_platform.py @@ -17,11 +17,12 @@ from pydantic import BeforeValidator PLATFORM_ALIAS_MAPPING: Final[dict[str, str]] = { - "z.ai": "zhipu", + "z.ai": "openai-compatible-model", "ModelArk": "openai-compatible-model", "grok": "openai-compatible-model", "ernie": "qianfan", "llama.cpp": "openai-compatible-model", + "deepseek": "openai-compatible-model", } # Bedrock Converse requires a region during model initialization. diff --git a/backend/tests/app/model/test_model_platform.py b/backend/tests/app/model/test_model_platform.py index c0fc28765..c645767e9 100644 --- a/backend/tests/app/model/test_model_platform.py +++ b/backend/tests/app/model/test_model_platform.py @@ -24,10 +24,11 @@ def test_normalize_model_platform_maps_known_aliases(): assert normalize_model_platform("grok") == "openai-compatible-model" - assert normalize_model_platform("z.ai") == "zhipu" + assert normalize_model_platform("z.ai") == "openai-compatible-model" assert normalize_model_platform("ModelArk") == "openai-compatible-model" assert normalize_model_platform("ernie") == "qianfan" assert normalize_model_platform("llama.cpp") == "openai-compatible-model" + assert normalize_model_platform("deepseek") == "openai-compatible-model" def test_normalize_model_platform_keeps_non_alias_unchanged():