# DeepSeek Official API Guide & Troubleshooting

> Cube Agent 2.4.1 Release (Build 2004105) User Guide.
> Category: Hot Questions. Content baseline: 2026-12-05.
> Web page: https://cubeagent.app/en/docs/deepseek_official_guide/

Many users migrating from the official DeepSeek website or mobile app ask: if I use an official DeepSeek API key in Cube Agent, how closely does it match the official app, where does it differ, and how can I avoid common pitfalls? This guide explains everything in plain terms.

## 1. Which official DeepSeek capabilities are supported?

- **Models & direct three-protocol support**: In **Settings → Models & usage → Provider Management**, choose the preset **DeepSeek** provider (official URL `https://api.deepseek.com`), which supports `deepseek-flash` and `deepseek-v4-pro`. `deepseek-flash` defaults to the **Anthropic Messages** protocol and can also be switched to **OpenAI Responses** or **Chat Completions** on the model edit page. Deep reasoning (thinking), multi-turn reasoning replay, and official context caching are all supported.
- **Official built-in search (Standard and Enhanced available separately; no tool-call fee—billed only by model tokens)**:
  - **Built-in Search (Standard)**: Under the default **Anthropic Messages** protocol, both `deepseek-flash` and `deepseek-v4-pro` use standard `web_search_20250305` (`deepseek-v4-pro` also supports Responses standard search). There is **no 32K single-message input cap**, sampling parameters (`temperature` / `top_p`) take full effect, it coexists with all client tools and MCP whether reasoning is on or off, and multi-turn prefix caching is the most stable.
  - **DeepSeek enhanced search (standalone option)**: When you want official-app-grade **reverse image search, automatic reading of links in messages, opening web pages and in-page search during reasoning, and inline source citations**, explicitly select **DeepSeek enhanced search** in the web search menu (supported on `deepseek-flash` across all three protocols).
- **Image upload reuse**: When sending images directly to the official endpoint, Cube Agent automatically uploads them through DeepSeek Files and reuses them during their validity period to avoid redundant transfers.
- **Standalone tools & ecosystem capabilities**:
  - **DeepSeek Search (standalone Search / Fetch API)**: Enable in **Settings → Assistant capabilities → Tool Services → Web Search**. Billed per successful request that returns results, usable with any model, and free of the 32K single-message input limit.
  - **DeepSeek OCR**: Configure in **Settings → Models & usage → Default Models → Document Parsing**. Supports full PDFs (up to 100 MiB and 1,000 pages per file).
  - **DeepSeek voice input and read-aloud**: Toggle each independently in **Settings → Voice**.
  - **Migrating from DeepSeek**: Under **Settings → Data & sync → Import Data**, paste an official DeepSeek export download link directly or select a ZIP archive (including legacy 2024 CSV exports), preserving message branches, reasoning traces, search sources, and attachments.

## 2. Why doesn't Cube Agent replicate 100% of the parameters in DeepSeek's official Chatbot guide?

DeepSeek's official "Build a Chatbot" guide describes three capabilities that Cube Agent intentionally does not copy by default—not by omission, but as deliberate trade-offs for a multi-model client's user experience and cost control:

- **No server-side auto-title (`title`)**: Including this parameter on the first turn forces the request into DeepSeek's Chatbot pipeline, triggering the 32K single-message limit even when web search is off, ignoring sampling parameters such as `temperature`, and adding several seconds of wait time at the end of the first turn. Cube Agent uses its own asynchronous smart title generation instead, which is faster and more reliable.
- **No server-hosted document parsing in place of local parsing**: Official hosted parsing bills per page on upload and does not let you download the parsed text. If you switch to Claude, GPT, or Gemini later in the same conversation, the document context would be lost completely. Cube Agent relies on local parsing, on-demand reading via **Conversation Files**, and standalone OCR so you can switch models at any time and keep chatting seamlessly.
- **No forced strict `safety_check` moderation by default**: For users bringing their own API keys, enabling it incurs extra moderation token charges, increases tail latency, discards sampling parameters, and can falsely block legitimate code or tool outputs.

## 3. Common issues and how to avoid them

## 1. Long single messages fail with `user input too long` (32,768-token limit)

- **Cause**: This does not mean `deepseek-flash` has a smaller context window. Instead, selecting **DeepSeek enhanced search** applies a hard 32K server-side cap to the **current single user message** (earlier turns in the conversation do not count toward this 32K cap, but pasting very long text or attaching large files in one message can easily hit it).
- **How to avoid / resolve**:
  - Prefer standard **Built-in Search** (with the default Anthropic Messages protocol) for daily use—it has no 32K single-message cap;
  - If you explicitly selected **DeepSeek enhanced search** on default Anthropic Messages and hit 32K, Cube Agent **silently falls back to standard built-in search to retry and keeps sticky fallback for the current context window**, preventing later turns from flipping back to enhanced search and breaking the cache again;
  - On **Responses** or **Chat Completions**, the failure card shows two one-tap actions—**Retry without built-in search** and **Retry with external search** (affecting only the current turn without changing your defaults);
  - For large PDFs, long source files, or large spreadsheets, place them in **Conversation Files** (top-right of the chat) and use the **File Operations** tool so the AI reads sections on demand—saving tokens and avoiding single-message limits.

## 2. Why didn't "reverse image search" or "auto-read links" trigger?

- **Cause**: Standard **Built-in Search** uses `web_search_20250305`, which does not include reverse image search or automatic link reading; only explicitly selecting **DeepSeek enhanced search** supports them. In addition, DeepSeek's server does not allow enhanced search to run together with client tools (such as File Operations or MCP) **when reasoning is off**—on Anthropic Messages, if reasoning is off while client tools are enabled, Cube Agent prioritizes keeping your tools working and automatically falls back to standard built-in search.
- **How to avoid**:
  - Switch to **DeepSeek enhanced search** in the web search menu and **turn on reasoning**—with reasoning enabled, enhanced search (image search, deep paginated search, opening pages, in-page find) coexists completely with all client tools;
  - **If you want image search or link reading with reasoning off**: Select **DeepSeek enhanced search**, then temporarily uncheck client tools in the composer's **Tools** menu, or create a lightweight assistant with no client tools enabled.

## 3. On Responses / Chat Completions with reasoning off and enhanced search on, MCP or file tools don't run

- **Cause**: Those two protocols do not have a standard built-in search fallback for `deepseek-flash`. To avoid an immediate HTTP 400 conflict, Cube Agent pauses client tools for that turn when reasoning is off and **DeepSeek enhanced search** is active.
- **How to avoid**: Switch back to the default **Anthropic Messages** protocol (where standard built-in search and client tools coexist fully), enable reasoning, or switch to an external search service.

## 4. Adjusting `temperature`, `top_p`, or stop sequences appears to have no effect

- **Cause**: Whenever a request runs through the **DeepSeek enhanced search** pipeline, the server takes over sampling and ignores `temperature`, `top_p`, stop sequences, and related parameters sent in the request.
- **How to avoid**: Switch to standard **Built-in Search** under default Anthropic Messages, turn off web search, or use an external search service—all sampling parameters will then take full effect.

## 5. Cache hit rate occasionally drops sharply

- **Cause**: DeepSeek's context cache matches by whether the beginning of the request stays identical. Keeping the same configuration across turns gives the highest hit rate (typically very high with search off or staying on standard built-in search; staying on enhanced search can also hit the cache, though the server's built-in search prompt accounts for a larger share). The following changes cause the prefix cache to be rebuilt on that turn:
  - Repeatedly toggling reasoning on/off, toggling tools, or switching between Built-in Search, DeepSeek enhanced search, and external search mid-conversation;
  - Pasting very long text that hits 32K and automatically falls back to standard built-in search rebuilds the cache once on that turn, then stays on standard search within the current context window so it does not bounce back and forth.
- **How to avoid**:
  - Keep reasoning, tools, and web search settings steady while working on the same task;
  - For long conversations or tasks requiring maximum cache stability, prefer standard **Built-in Search** or turn web search off;
  - Start a new conversation when switching to an unrelated topic (see "How do I improve cache hit rates and lower API costs?" in the Help Center).

## 6. After enabling built-in search mid-way through an old chat, the model still says it "cannot browse the web"

- Choose **Built-in Search** in that conversation's web search menu, then send "Please verify this online and include sources." Previous search records remain intact, and older errors in tool cards only reflect those past calls.
- If the new request still fails, include the tool card's "Result" and "Arguments", the model name, and the selected protocol when sending feedback so the actual search path can be checked.

## 4. Which setup works best for each scenario?

- **Everyday research, coding, running MCP, strict temperature control, reviewing very long texts**: Default **Anthropic Messages** + `deepseek-flash` + standard **Built-in Search** (or search off)—no 32K cap, full sampling parameter control, seamless coexistence with all tools, and the most stable cache hit rate.
- **Deep research, reverse image search, automatic link reading**: Switch to **DeepSeek enhanced search** + **Reasoning on**—official-grade image search, pagination, page opening, and in-page find together with local tools, plus automatic sticky fallback if you hit 32K.
- **Fast lightweight chat (reasoning off + image search / link reading)**: Choose **DeepSeek enhanced search** and uncheck client tools in the **Tools** menu.
