> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cowagent.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# DeepSeek

> DeepSeek model configuration (Text Chat + Thinking Mode)

DeepSeek is one of the default recommended providers in Agent mode, focused on cost-effective text chat and task planning.

## Text Chat

```json theme={null}
{
  "model": "deepseek-v4-flash",
  "deepseek_api_key": "YOUR_API_KEY"
}
```

| Parameter           | Description                                                                                |
| ------------------- | ------------------------------------------------------------------------------------------ |
| `model`             | Supports `deepseek-v4-flash` (Default), `deepseek-v4-pro`                                  |
| `deepseek_api_key`  | Create one on the [DeepSeek Platform](https://platform.deepseek.com/api_keys)              |
| `deepseek_api_base` | Optional, defaults to `https://api.deepseek.com/v1`. Can be changed to a third-party proxy |

### Model Selection

| Model               | Use Case                               |
| ------------------- | -------------------------------------- |
| `deepseek-v4-flash` | Default recommended; fast and low cost |
| `deepseek-v4-pro`   | Smarter; better for complex tasks      |

## Thinking Mode

The V4 series (`deepseek-v4-flash` / `deepseek-v4-pro`) supports an explicit "thinking mode": before producing the final answer, the model emits a chain of thought (`reasoning_content`) to improve answer quality.

### Toggle

Controlled by the global `enable_thinking` config, and can also be toggled from the Web Console's configuration page:

```json theme={null}
{
  "enable_thinking": true
}
```

* `true`: the model thinks before answering across all channels. The Web Console displays the thinking process; IM channels (WeChat / WeCom / DingTalk / Feishu) do not show it but still get better answers.
* `false`: thinking is disabled, responses are faster, and time-to-first-token is lower.

### Reasoning Effort

Under thinking mode, `reasoning_effort` controls reasoning intensity:

```json theme={null}
{
  "enable_thinking": true,
  "reasoning_effort": "high"
}
```

| Value            | Use Case                                                                                                            |
| ---------------- | ------------------------------------------------------------------------------------------------------------------- |
| `high` (Default) | Day-to-day Agent tasks; balanced reasoning and speed                                                                |
| `max`            | Complex coding, long-horizon planning, strictly constrained tasks; deeper reasoning but more time and output tokens |

`reasoning_effort` only takes effect when `enable_thinking` is `true`; it is ignored automatically when the model does not support thinking mode.

### Behavior Notes

* **Sampling parameters**: in thinking mode, `temperature`, `top_p`, `presence_penalty`, and `frequency_penalty` are ignored by the server (without errors). CowAgent automatically skips them.
* **Multi-turn tool calls**: when the history contains tool calls, DeepSeek requires every assistant message to include `reasoning_content`. CowAgent handles this automatically, so toggling thinking mode across turns will not cause errors.

<Tip>
  `deepseek-v4-flash` is used by default; switch to `deepseek-v4-pro` for complex tasks; enable `enable_thinking` when deep reasoning is needed.
</Tip>
