Class DeepSeekClient
- All Implemented Interfaces:
com.tnsai.llm.LLMClient
DeepSeek is a Chinese frontier-model lab. The API is
OpenAI-compatible at https://api.deepseek.com/v1 — same
chat-completions wire format as GroqClient /
XAIGrokClient / YiClient, so this client is a thin
subclass of AbstractOpenAICompatibleClient.
Supported models (at time of writing):
- deepseek-chat — V3 general chat (very cost-efficient: ~$0.14/M input, $0.28/M output)
- deepseek-reasoner — R1 reasoning model with visible chain-of-thought
The catalog evolves; check the live list at api-docs.deepseek.com.
About reasoning_content (R1). When the model is
deepseek-reasoner, responses include a
reasoning_content field on each message/delta carrying the
model's visible chain-of-thought trace, alongside the standard
OpenAI content field with the final answer. The shared
ChatResponse SPI doesn't carry a thinking/reasoning channel,
so the base client surfaces only the final content and drops
the reasoning trace on the floor. R1 still answers correctly — callers
just don't see the trace. Plumbing the reasoning content through is a
separate ChatResponse/ChatChunk extension and a
follow-up issue.
Configuration via environment variable:
DEEPSEEK_API_KEY— Required.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeepSeekClient(String model) DeepSeekClient(String model, float temperature) DeepSeekClient(String model, float temperature, Float topP, Integer maxTokens) DeepSeekClient(String model, float temperature, Integer maxTokens) DeepSeekClient(String baseUrl, String model, float temperature, Float topP, Integer maxTokens, String apiKey) DeepSeekClient(String baseUrl, String model, float temperature, Integer maxTokens, String apiKey) -
Method Summary
Methods inherited from class com.tnsai.llm.providers.AbstractOpenAICompatibleClient
chat, streamChatMethods inherited from class com.tnsai.llm.providers.AbstractLLMClient
getBaseUrl, getCallTimeoutMs, getMaxTokens, getModel, getTemperature, getTopPMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tnsai.llm.LLMClient
chat, chat, chat, chat, chat, getCapabilities, getProviderName, listModels, streamChat, streamChat, streamChatWithHandler, streamChatWithHandler, streamChatWithSpec, streamChatWithSpec
-
Constructor Details
-
DeepSeekClient
-
DeepSeekClient
-
DeepSeekClient
-
DeepSeekClient
-
DeepSeekClient
-
DeepSeekClient
-