feat: add DeepSeek provider support

This commit is contained in:
Kyya Wang
2026-02-03 03:09:13 +00:00
parent 30d6e4b4b6
commit f23548f296
3 changed files with 12 additions and 2 deletions

View File

@@ -43,6 +43,8 @@ class LiteLLMProvider(LLMProvider):
elif self.is_vllm:
# vLLM/custom endpoint - uses OpenAI-compatible API
os.environ["OPENAI_API_KEY"] = api_key
elif "deepseek" in default_model:
os.environ.setdefault("DEEPSEEK_API_KEY", api_key)
elif "anthropic" in default_model:
os.environ.setdefault("ANTHROPIC_API_KEY", api_key)
elif "openai" in default_model or "gpt" in default_model:
@@ -103,6 +105,10 @@ class LiteLLMProvider(LLMProvider):
if "gemini" in model.lower() and not model.startswith("gemini/"):
model = f"gemini/{model}"
# Force set env vars for the provider based on model
if "deepseek" in model:
os.environ["DEEPSEEK_API_KEY"] = self.api_key
kwargs: dict[str, Any] = {
"model": model,
"messages": messages,