Large language models are the most powerful AI tools available today — they serve as the engine that powers agent execution.
Models are the reasoning engine of agents. They drive the agent's decision-making process, determining which tools to call, how to interpret results, and when to provide the final answer. DeepSeek, with its openness, innovation, and excellent cost-efficiency, has become one of the preferred LLMs for agent development.
Everything starts with createModel(). You only need to specify the model name to create a model instance — the API key is automatically read from the DEEPSEEK_API_KEY environment variable:
import { createModel } from 'deepseek-kit'
const model = createModel({
model: 'deepseek-v4-flash',
})
If you need to explicitly pass an API key or use a custom endpoint, you can configure apiKey and baseURL:
DeepSeek models have thinking mode enabled by default. The model performs deep reasoning before answering, which is ideal for handling complex problems. The default reasoning effort is 'high'. You can disable thinking mode or adjust the reasoning effort as needed:
Model identifier. Supports deepseek-v4-flash, deepseek-v4-pro, or a custom string.
apiKeystring
DEEPSEEK_API_KEY env variable
DeepSeek API key.
baseURLstring
https://api.deepseek.com
API base URL.
userIdstring
Optional user identifier.
thinking{ type: 'enabled' | 'disabled' }
Enable/disable thinking mode.
reasoningEffort'high' | 'max'
Reasoning effort level.
maxTokensnumber
Maximum number of tokens to generate.
temperaturenumber
Sampling temperature (0-2).
topPnumber
Nucleus sampling parameter.
streamOptions{ include_usage: boolean }
Streaming options.
timeoutnumber
60000
Request timeout in milliseconds.
maxRetriesnumber
3
Maximum retry count for 429/500/503 errors.
strictboolean
false
Enable strict mode for all tool calls. When enabled, the SDK automatically uses the Beta endpoint and passes strict: true for all tools in requests. See Strict Mode for details.