<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Cline on KnightLi Blog</title>
        <link>https://www.knightli.com/en/tags/cline/</link>
        <description>Recent content in Cline on KnightLi Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Fri, 01 May 2026 20:59:06 +0800</lastBuildDate><atom:link href="https://www.knightli.com/en/tags/cline/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>How to Use DeepSeek V4 Pro in Cline</title>
        <link>https://www.knightli.com/en/2026/05/01/use-deepseek-v4-pro-in-cline/</link>
        <pubDate>Fri, 01 May 2026 20:59:06 +0800</pubDate>
        
        <guid>https://www.knightli.com/en/2026/05/01/use-deepseek-v4-pro-in-cline/</guid>
        <description>&lt;p&gt;Cline already supports the OpenAI Compatible Provider.
DeepSeek API is also compatible with OpenAI SDK-style calls, so connecting &lt;code&gt;deepseek-v4-pro&lt;/code&gt; to Cline is not complicated: choose OpenAI Compatible, then fill in DeepSeek&amp;rsquo;s Base URL, API Key, and model name.&lt;/p&gt;
&lt;p&gt;The steps below cover both the VS Code extension UI and Cline CLI.&lt;/p&gt;
&lt;h2 id=&#34;prepare-a-deepseek-api-key&#34;&gt;Prepare a DeepSeek API Key
&lt;/h2&gt;&lt;p&gt;First, create an API Key on the DeepSeek platform.&lt;/p&gt;
&lt;p&gt;You need three values:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Item&lt;/th&gt;
          &lt;th&gt;Value&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;Provider&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;OpenAI Compatible&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Base URL&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;https://api.deepseek.com&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Model ID&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;deepseek-v4-pro&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;DeepSeek&amp;rsquo;s official documentation states that the V4 series uses the existing OpenAI-compatible interface. Keep &lt;code&gt;base_url&lt;/code&gt; as &lt;code&gt;https://api.deepseek.com&lt;/code&gt;, and set &lt;code&gt;model&lt;/code&gt; to &lt;code&gt;deepseek-v4-pro&lt;/code&gt; or &lt;code&gt;deepseek-v4-flash&lt;/code&gt; when calling it.&lt;/p&gt;
&lt;h2 id=&#34;configure-it-in-the-cline-extension&#34;&gt;Configure It in the Cline Extension
&lt;/h2&gt;&lt;p&gt;If you use the Cline extension in VS Code, configure it this way:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open Cline from the VS Code sidebar.&lt;/li&gt;
&lt;li&gt;Go to Cline settings or model configuration.&lt;/li&gt;
&lt;li&gt;Select &lt;code&gt;OpenAI Compatible&lt;/code&gt; as the provider.&lt;/li&gt;
&lt;li&gt;Enter your DeepSeek API Key.&lt;/li&gt;
&lt;li&gt;Set Base URL to:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;https://api.deepseek.com
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ol start=&#34;6&#34;&gt;
&lt;li&gt;Set Model ID to:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;deepseek-v4-pro
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ol start=&#34;7&#34;&gt;
&lt;li&gt;Save the configuration and run a simple test in Cline.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Start with a low-risk read-only task:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Please read the current project directory structure and summarize what type of project this is. Do not modify any files.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If Cline can read and answer normally, the model connection is working.&lt;/p&gt;
&lt;h2 id=&#34;configure-it-in-cline-cli&#34;&gt;Configure It in Cline CLI
&lt;/h2&gt;&lt;p&gt;If you use Cline CLI, run &lt;code&gt;cline provider configure openai-compatible&lt;/code&gt; to enter interactive configuration.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cline provider configure openai-compatible
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Fill in:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;API Key: sk-...
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Base URL: https://api.deepseek.com
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Model ID: deepseek-v4-pro
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;After configuration, test it with a read-only task:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cline &lt;span class=&#34;s2&#34;&gt;&amp;#34;Summarize this repository structure without changing files.&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If you want to lower cost first, you can temporarily change Model ID to:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;deepseek-v4-flash
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then switch back to &lt;code&gt;deepseek-v4-pro&lt;/code&gt; for complex planning, fact checking, multi-tool collaboration, or high-risk code changes.&lt;/p&gt;
&lt;h2 id=&#34;recommended-model-split&#34;&gt;Recommended Model Split
&lt;/h2&gt;&lt;p&gt;DeepSeek V4 Pro and Flash are better used with a clear split.&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Model&lt;/th&gt;
          &lt;th&gt;Best for&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;deepseek-v4-flash&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Routine code reading, small batch fixes, script generation, context summarization, low-risk frontend changes&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;deepseek-v4-pro&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Architecture planning, complex bugs, cross-file refactors, fact checking, multi-tool calls, high-risk changes&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;For Agent tools like Cline, cost mainly comes from long context, repeated file reads, plan generation, and multi-round tool calls.
If the task is light, use Flash for volume; if the task needs stronger judgment, switch to Pro.&lt;/p&gt;
&lt;h2 id=&#34;how-to-set-context-length&#34;&gt;How to Set Context Length
&lt;/h2&gt;&lt;p&gt;DeepSeek V4 Pro and Flash both support long context.
If Cline requires a manual context window value, you can understand it according to the 1M context listed on DeepSeek&amp;rsquo;s official model page.&lt;/p&gt;
&lt;p&gt;In practice, do not put every file into context at the beginning.
Cline reads files according to the task, and a better workflow is usually:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;first ask it to inspect the directory structure;&lt;/li&gt;
&lt;li&gt;then ask it to locate relevant files;&lt;/li&gt;
&lt;li&gt;finally let it modify only the target files.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This saves tokens and keeps the task boundary clearer.&lt;/p&gt;
&lt;h2 id=&#34;common-issues&#34;&gt;Common Issues
&lt;/h2&gt;&lt;h3 id=&#34;1-model-not-found&#34;&gt;1. Model Not Found
&lt;/h3&gt;&lt;p&gt;First check that Model ID is exactly:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;deepseek-v4-pro
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Do not write &lt;code&gt;DeepSeek V4 Pro&lt;/code&gt;, &lt;code&gt;deepseek-v4&lt;/code&gt;, or another display name.&lt;/p&gt;
&lt;h3 id=&#34;2-401-or-authentication-failed&#34;&gt;2. 401 or Authentication Failed
&lt;/h3&gt;&lt;p&gt;Check the API Key:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;whether it was copied completely;&lt;/li&gt;
&lt;li&gt;whether it contains extra spaces;&lt;/li&gt;
&lt;li&gt;whether it was entered into the provider configuration Cline is currently using;&lt;/li&gt;
&lt;li&gt;whether the DeepSeek account has available balance.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;3-connection-failed&#34;&gt;3. Connection Failed
&lt;/h3&gt;&lt;p&gt;Check the Base URL:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;https://api.deepseek.com
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Do not append &lt;code&gt;/v1/chat/completions&lt;/code&gt; at the end.
Cline&amp;rsquo;s OpenAI Compatible Provider will construct compatible interface requests itself.&lt;/p&gt;
&lt;h3 id=&#34;4-cline-calls-are-too-expensive&#34;&gt;4. Cline Calls Are Too Expensive
&lt;/h3&gt;&lt;p&gt;You can switch routine tasks to &lt;code&gt;deepseek-v4-flash&lt;/code&gt; and use &lt;code&gt;deepseek-v4-pro&lt;/code&gt; only for complex tasks.&lt;/p&gt;
&lt;p&gt;Also, make the task description as clear as possible:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Only modify files related to the login page. Do not refactor unrelated modules. First provide a plan, and modify code only after confirmation.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Agent tasks are most expensive when boundaries are unclear.
The clearer the boundary, the fewer files it reads, the fewer tool calls it makes, and the more controllable the cost becomes.&lt;/p&gt;
&lt;h3 id=&#34;5-error-reasoning_content-must-be-passed-back&#34;&gt;5. Error: reasoning_content must be passed back
&lt;/h3&gt;&lt;p&gt;If you see an error like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;#34;message&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;400 The `reasoning_content` in the thinking mode must be passed back to the API.&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;#34;code&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;invalid_request_error&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;#34;modelId&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;deepseek-v4-pro&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This is usually not a Key, quota, or Base URL problem. It means DeepSeek V4 Pro&amp;rsquo;s thinking mode and the current client&amp;rsquo;s multi-round tool-call history are not aligned.&lt;/p&gt;
&lt;p&gt;DeepSeek&amp;rsquo;s official documentation states:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;thinking mode is &lt;code&gt;enabled&lt;/code&gt; by default;&lt;/li&gt;
&lt;li&gt;thinking mode returns &lt;code&gt;reasoning_content&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;if a tool call happens in one round, subsequent requests must pass back the &lt;code&gt;reasoning_content&lt;/code&gt; from that assistant message;&lt;/li&gt;
&lt;li&gt;if the client does not pass it back correctly, the API returns 400.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When Cline connects through the OpenAI Compatible Provider, this error may appear in the second round or after tool calls if the current version does not fully preserve and return DeepSeek&amp;rsquo;s &lt;code&gt;reasoning_content&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Try this order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Upgrade Cline to the latest version;&lt;/li&gt;
&lt;li&gt;confirm you are using &lt;code&gt;OpenAI Compatible&lt;/code&gt;, not the normal &lt;code&gt;OpenAI&lt;/code&gt; provider;&lt;/li&gt;
&lt;li&gt;if Cline supports a custom request body, try disabling thinking mode:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;#34;thinking&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nt&#34;&gt;&amp;#34;type&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;disabled&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ol start=&#34;4&#34;&gt;
&lt;li&gt;if Cline does not support extra body parameters, temporarily use another model or a compatible proxy service;&lt;/li&gt;
&lt;li&gt;switch back to &lt;code&gt;deepseek-v4-pro&lt;/code&gt; after Cline supports passing back DeepSeek V4 &lt;code&gt;reasoning_content&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note that disabling thinking mode may reduce complex reasoning ability, but it can work around client compatibility issues where &lt;code&gt;reasoning_content&lt;/code&gt; is not passed back.&lt;/p&gt;
&lt;h2 id=&#34;copyable-configuration&#34;&gt;Copyable Configuration
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Provider: OpenAI Compatible
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;API Key: sk-your DeepSeek API Key
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Base URL: https://api.deepseek.com
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Model ID: deepseek-v4-pro
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;For low-cost mode:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Provider: OpenAI Compatible
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;API Key: sk-your DeepSeek API Key
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Base URL: https://api.deepseek.com
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Model ID: deepseek-v4-flash
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;There are only three key steps to calling DeepSeek V4 Pro in Cline:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;choose &lt;code&gt;OpenAI Compatible&lt;/code&gt; as the provider;&lt;/li&gt;
&lt;li&gt;set Base URL to &lt;code&gt;https://api.deepseek.com&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;set Model ID to &lt;code&gt;deepseek-v4-pro&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After configuration, test with a read-only task before giving it real code changes.
If you often run Agent tasks, split Flash and Pro: Flash handles high-frequency lightweight work, while Pro handles complex judgment and fallback tasks.&lt;/p&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://docs.cline.bot/provider-config/openai-compatible&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Cline Docs: OpenAI Compatible Provider&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://docs.cline.bot/provider-config/overview&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Cline Docs: Provider Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://api-docs.deepseek.com/news/news202605&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;DeepSeek API Docs: News&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://api-docs.deepseek.com/quick_start/pricing/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;DeepSeek API Docs: Models &amp;amp; Pricing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        
    </channel>
</rss>
