Ultimate DeepSeek
AI-generatedSummary
Supplies a DeepSeek chat model (AI Language Model sub-node) to an AI Agent or chain, preserving reasoning_content across tool-call turns so thinking mode works with tools.
Inputs
- model — DeepSeek model: deepseek-chat (default), deepseek-reasoner, deepseek-v4-pro, or deepseek-v4-flash.
- enableThinking — Default true. When on, the request sends thinking:{type:'enabled'} (and reasoning effort) and reasoning_content is kept in the message history. When off, sampling parameters are sent instead.
- options.reasoningEffort — High or Max. Sent as reasoning_effort only when thinking is enabled.
- options.maxTokens — Max tokens to generate, including reasoning tokens. Defaults to 8192; the UI caps it at 65536.
- options.temperature — Randomness, 0–2. Sent only when thinking is disabled.
- options.topP — Nucleus sampling, 0–1. Sent only when thinking is disabled.
- options.frequencyPenalty — -2 to 2. Sent only when thinking is disabled.
- options.presencePenalty — -2 to 2. Sent only when thinking is disabled.
- options.maxRetries — Retries on API failure with exponential backoff (1s, 2s, ...). Default 2.
Output shape
A LangChain chat model object on the AI Language Model connection, not item data. The connected agent calls it, and it returns AI messages with text, tool_calls, reasoning_content in additional_kwargs, and token usage.
Requires the deepSeekReasonerApi credential (API key, optional baseUrl, default https://api.deepseek.com). Calls /chat/completions without streaming. The model strips
blocks and some leaked self-talk lines, collapses fully repeated responses, and falls back to reasoning text if content is empty. It throws an 'Infinite tool loop' error if the same normalized tool call repeats more than 3 times in a turn. The node has no regular inputs.
Examples
Example 1: Power an AI Agent with tools using DeepSeek thinking mode
Model=deepseek-chat, Enable Thinking=true, Reasoning Effort=high; connect to the AI Agent's Chat Model input.
Example 2: Fast non-reasoning replies with controlled randomness
Model=deepseek-v4-flash, Enable Thinking=false, Temperature=0.3, Max Tokens=2048.
Example 3: Hard multi-step reasoning task
Model=deepseek-reasoner, Reasoning Effort=max, Max Tokens=32768, Max Retries=3.