feat: add deepseek (#2497)

This commit is contained in:
Alex authored and GitHub committed 2026-05-25 18:15:29 +01:00
1 parent bb3bd3da4d
commit 7429996d38
2 files changed
+28 -2

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
provider: openai_compatible
display_provider: deepseek
api_key_env: DEEPSEEK_API_KEY
base_url: https://api.deepseek.com/v1
defaults:
supports_tools: true
supports_structured_output: true
context_window: 1048576
models:
- id: deepseek-v4-flash
display_name: DeepSeek V4 Flash
description: Cost-efficient 1M-context model with hybrid thinking / non-thinking modes, tool calling and FIM completion
- id: deepseek-v4-pro
display_name: DeepSeek V4 Pro
description: Frontier 1M-context model with hybrid thinking / non-thinking modes for advanced reasoning and agentic coding
+10 -2
View File
@@ -56,6 +56,10 @@ EXPECTED_IDS = {
"moonshotai/kimi-k2.6",
"zai-org/glm-5",
},
"openai_compatible": {
"deepseek-v4-flash",
"deepseek-v4-pro",
},
"azure_openai": {
"azure-gpt-5.5",
"azure-gpt-5.4-mini",
@@ -88,8 +92,11 @@ def _make_settings(**overrides):
@pytest.fixture(autouse=True)
def _reset_registry():
def _reset_registry(monkeypatch):
ModelRegistry.reset()
# openai_compatible catalogs read their key directly from os.environ,
# so clear any host-set keys to keep these tests deterministic.
monkeypatch.delenv("DEEPSEEK_API_KEY", raising=False)
yield
ModelRegistry.reset()
@@ -248,7 +255,8 @@ class TestRegistryPermutations:
ids = {m.id for m in reg.get_all_models()}
assert "azure-gpt-5.5" in ids
def test_everything_set(self):
def test_everything_set(self, monkeypatch):
monkeypatch.setenv("DEEPSEEK_API_KEY", "x")
s = _make_settings(
OPENAI_API_KEY="x",
ANTHROPIC_API_KEY="x",