Using deepseek-v4-pro:cloud in Cursor via local Ollama and GitLens — lessons from the reasoning_content mess

DeepSeek V4 (deepseek-v4-pro:cloud) in Cursor via local Ollama + GitLens

What / why: Pointing Cursor straight at the DeepSeek API often breaks on V4 + thinking + tools, because callers must replay reasoning_content correctly; Cursor’s own OpenAI-compatible path isn’t fully there yet. Workaround: run deepseek-v4-pro:cloud through local Ollama, point GitLens → Ollama, then add the same model id under Cursor → Settings → Models → Add Custom Model.

My experience: Agent mode works — tokens billed on the DeepSeek side. Subagents / nested agent routing do not work — that chain is different and longer; this bridge doesn’t land there.


Prerequisites (short)

  1. Install Ollama — get it from ollama.com → Downloads (Windows: PowerShell one-liner on the same page; Linux/macOS: install script linked there too).
  2. Ollama account in browser — sign-up, then device keys / API keys where the dashboard asks (cloud usage).
  3. DeepSeek — sign up at platform.deepseek.com, issue an API key, add a small balance.
  4. Cursor + GitLens extension (Extensions sidebar → search GitLens → GitKraken).
  5. Accept local CPU/RAM churn — Ollama still runs as a process on your box.

Steps

A — Ollama + cloud model

  • Put DeepSeek’s API key where your Ollama version asks when you use deepseek-v4-pro:cloud (exact labels change — follow in-app prompts / Ollama help).

  • Terminal 1:

    ollama run deepseek-v4-pro:cloud
    

    (Often run from pwsh on Windows — easier lifecycle.)

  • Terminal 2:

    ollama ps
    

    Copy the exact model name printed (often deepseek-v4-pro:cloud).

B — GitLens ↔ Ollama in Cursor

  • Command Palette (Ctrl+Shift+P): run GitLens: Switch AI Provider / Model (wording may differ).
  • Provider: Ollama.
  • Base URL GitLens expects (OpenAI-compatible):
    http://localhost:11434/v1
  • Paste Ollama API key when asked.
  • Pick the model id identical to ollama ps (including the :cloud tag if shown).

C — Cursor model list

Cursor Settings (gear) → sidebar ModelsAdd Custom Model → paste the same string → confirm / restart Cursor if picker is stale.

D — Optional one-liner “prime” (experimental)

Paste once in the shell where ollama run is alive:

Keep reasoning on; across tool-heavy turns preserve full assistant payloads so thinking + tools chains stay coherent.

(YMMV — not a substitute for correct host URL / keys.)


Honest limits

Yes No
Agent in Cursor with billed usage Cursor subagent UX / routing
Heavier chats vs flaky direct DeepSeek hostname in Cursor for some setups Guaranteed on every Cursor/Ollama update — retest after upgrades

Read more (without burning your 2-link budget)

Pick exactly two links for your forum — my suggestions:

  1. Cursor forum — topic “Add Custom Model…” containing the team note that Cursor doesn’t replay reasoning_content correctly for DeepSeek V4 yet → web search Cursor forum add-custom-model reasoning_content DeepSeek.

  2. DeepSeek docs — site api-docs.deepseek.com → left nav Thinking Mode → section Tool Calls (requirements for reasoning_content on follow-up turns).

(Optional third topics to mention in prose only: Cursor forum compatibility + reasoning_content + DeepSeek for the open feature request; official Cursor Help → search API keys / models for how BYOK is routed.)


Disclaimer

Not affiliated with Cursor, Ollama, or DeepSeek. Blur API keys in any screenshot. If it breaks, check ollama ps, GitLens version, Cursor → Help → About.

Good luck.

1 Like

you can this do 100% free also with litellm and a clouflare tunnel.