2222use Cognesy \Instructor \Features \LLM \Drivers \CohereV2 \CohereV2RequestAdapter ;
2323use Cognesy \Instructor \Features \LLM \Drivers \CohereV2 \CohereV2ResponseAdapter ;
2424use Cognesy \Instructor \Features \LLM \Drivers \CohereV2 \CohereV2UsageFormat ;
25+ use Cognesy \Instructor \Features \LLM \Drivers \Deepseek \DeepseekResponseAdapter ;
2526use Cognesy \Instructor \Features \LLM \Drivers \Gemini \GeminiBodyFormat ;
2627use Cognesy \Instructor \Features \LLM \Drivers \Gemini \GeminiMessageFormat ;
2728use Cognesy \Instructor \Features \LLM \Drivers \Gemini \GeminiRequestAdapter ;
@@ -67,6 +68,7 @@ public function make(LLMConfig $config, CanHandleHttp $httpClient, EventDispatch
6768 LLMProviderType::Cerebras => $ this ->cerebras ($ config , $ httpClient , $ events ),
6869 LLMProviderType::CohereV1 => $ this ->cohereV1 ($ config , $ httpClient , $ events ),
6970 LLMProviderType::CohereV2 => $ this ->cohereV2 ($ config , $ httpClient , $ events ),
71+ LLMProviderType::DeepSeek => $ this ->deepseek ($ config , $ httpClient , $ events ),
7072 LLMProviderType::Gemini => $ this ->gemini ($ config , $ httpClient , $ events ),
7173 LLMProviderType::GeminiOAI => $ this ->geminiOAI ($ config , $ httpClient , $ events ),
7274 LLMProviderType::Groq => $ this ->groq ($ config , $ httpClient , $ events ),
@@ -78,7 +80,6 @@ public function make(LLMConfig $config, CanHandleHttp $httpClient, EventDispatch
7880 LLMProviderType::XAi => $ this ->xAi ($ config , $ httpClient , $ events ),
7981 // OpenAI compatible driver for generic OAI providers
8082 LLMProviderType::A21 ,
81- LLMProviderType::DeepSeek,
8283 LLMProviderType::Fireworks,
8384 LLMProviderType::Ollama,
8485 LLMProviderType::OpenAICompatible,
@@ -153,6 +154,19 @@ public function cohereV2(LLMConfig $config, CanHandleHttp $httpClient, EventDisp
153154 );
154155 }
155156
157+ public function deepseek (LLMConfig $ config , CanHandleHttp $ httpClient , EventDispatcher $ events ): CanHandleInference {
158+ return new ModularLLMDriver (
159+ $ config ,
160+ new OpenAIRequestAdapter (
161+ $ config ,
162+ new OpenAICompatibleBodyFormat ($ config , new OpenAIMessageFormat ())
163+ ),
164+ new DeepseekResponseAdapter (new OpenAIUsageFormat ()),
165+ $ httpClient ,
166+ $ events
167+ );
168+ }
169+
156170 public function gemini (LLMConfig $ config , CanHandleHttp $ httpClient , EventDispatcher $ events ): CanHandleInference {
157171 return new ModularLLMDriver (
158172 $ config ,
0 commit comments