deepseek-v4-flash(default): fast V4 model, 1M context. Hybrid thinking + non-thinking.deepseek-v4-pro: flagship V4 model, 1M context. Hybrid thinking + non-thinking.
Installation
Authentication
Set yourDEEPSEEK_API_KEY environment variable. Get your key from here.
Example
UseDeepSeek with your Agent:
View more examples here.
Parameters
DeepSeek extends the OpenAI-compatible interface and supports most parameters from the OpenAI model.
Note: DeepSeek supports JSON mode but not native json_schema structured outputs, so supports_native_structured_outputs is set to False. Use use_json_mode=True for structured output.
Available Models
Thinking mode
V4 models run with thinking enabled by default, so you getreasoning_content out of the box. Control it with the use_thinking flag:
For agent scenarios, DeepSeek recommends
reasoning_effort="max". The API default is "high". While thinking is active, temperature, top_p, presence_penalty and frequency_penalty are ignored by the API.