ai-agents #cursor#openai#claude#deepseek#developer tools

OpenAI is Leaving Cursor: How to Configure Custom Models

S

S L Manikanta

Aug 30, 2026 4 min read

✉ Newsletter

Want to build production-ready AI?

Subscribe to StackMindset to receive actionable systems engineering checklists and code walkthroughs. No spam, only technical insights.

OpenAI recently announced the termination of its direct model supply contract with Cursor. While this came as a surprise to many developers, it highlights a critical reality in AI engineering: relying on a single IDE vendor for your model access creates sudden workflow dependencies.

If you rely on Cursor for daily coding, there is no need to panic. OpenAI models only represented a small fraction of total Cursor traffic, and Cursor has long supported custom API keys, OpenRouter routing, and local model backends.

Here is what the contract termination means for developers, and how to configure custom API keys for Anthropic Claude, DeepSeek, and local Ollama instances directly inside Cursor.

flowchart LR
    CursorIDE[Cursor Editor UI] --> Router{Cursor Model Router}

    subgraph Direct [Custom Cloud API Keys]
        Router -->|Custom Anthropic Key| AnthropicAPI[Claude 3.7 Sonnet / Opus]
        Router -->|Custom DeepSeek Key| DeepSeekAPI[DeepSeek V3 / R1]
        Router -->|OpenRouter Key| OpenRouter[OpenRouter Multi-Provider Hub]
    end

    subgraph Local [Local Private Inference]
        Router -->|Localhost:11434| Ollama[Local Ollama / vLLM Server]
    end

What Is Changing and When?

OpenAI will stop serving models directly through Cursor’s default subscription backend on November 12, 2026.

  • What stops working: The built in default toggles for OpenAI models without your own API key.
  • What keeps working: Anthropic models (Claude 3.7 Sonnet, Claude 3.5 Haiku, Opus), Google models, and any custom API key you enter into Cursor settings.
  • Why this matters: If you prefer OpenAI models or want cheaper alternatives like DeepSeek, configuring your own API keys or routing via OpenRouter gives you lower per token pricing and zero vendor lock in.

1. Configuring Anthropic Claude with Your Own API Key

Anthropic models are the primary choice for multi-file coding and agent loops in Cursor. Using your own Anthropic key gives you direct billing control and prevents IDE monthly usage caps.

Step-by-Step Setup:

  1. Open Cursor Settings (Ctrl + Shift + J on Windows/Linux or Cmd + Shift + J on macOS).
  2. Navigate to Models in the left sidebar.
  3. Scroll to Anthropic API Key.
  4. Paste your key (sk-ant-api03-...) and click Verify.
  5. Enable claude-3-7-sonnet and claude-3-5-haiku in the model list.

2. Setting Up DeepSeek V3 and R1 via Custom OpenAI Endpoints

DeepSeek offers world class coding and reasoning performance at roughly 90% lower cost than frontier US models. You can connect DeepSeek directly to Cursor using its OpenAI compatible API endpoint.

Step-by-Step Setup:

  1. Generate an API key from the DeepSeek Platform console.
  2. In Cursor Settings, go to Models > OpenAI API Key.
  3. Toggle on Override OpenAI Base URL.
  4. Enter the DeepSeek base URL:
    https://api.deepseek.com/v1
  5. Enter your DeepSeek API key (sk-...) and click Save.
  6. Under Model Names, click Add Custom Model and add:
    • deepseek-chat (DeepSeek V3 for fast code generation)
    • deepseek-reasoner (DeepSeek R1 for complex logic and debugging)

3. Using OpenRouter as a Universal Model Hub

If you want access to dozens of models (Meta Llama 3.3, Mistral, Qwen 2.5 Coder, Gemini, DeepSeek, and OpenAI) through a single key, OpenRouter is the cleanest solution.

Step-by-Step Setup:

  1. In Cursor Settings, navigate to Models > OpenAI API Key.
  2. Toggle on Override OpenAI Base URL and set it to:
    https://openrouter.ai/api/v1
  3. Paste your OpenRouter API key (sk-or-v1-...).
  4. Add the specific model identifiers you want to use:
    • anthropic/claude-3.7-sonnet
    • deepseek/deepseek-r1
    • qwen/qwen-2.5-coder-32b-instruct
    • google/gemini-2.5-pro

4. Connecting Local Models via Ollama (100% Free & Private)

If you work on private codebases or want to code without an internet connection, you can connect Cursor to local models running on your machine with Ollama.

Step-by-Step Setup:

  1. Launch Ollama in your terminal with your preferred coding model:

    ollama run qwen2.5-coder:14b
  2. Make sure Ollama accepts external requests by setting the host environment variable if necessary:

    # Linux / macOS
    export OLLAMA_HOST="0.0.0.0:11434"
    ollama serve
  3. In Cursor Settings > Models > OpenAI API Key:

    • Set Base URL to: http://localhost:11434/v1
    • Set API Key to: ollama (any placeholder string works)
    • Add model name: qwen2.5-coder:14b or deepseek-r1:8b

Practical Takeaways for Developers

  1. Decouple from Default Subscriptions: Bringing your own API keys ensures you are never impacted when partnerships change.
  2. Mix Models by Task: Use cheap, fast models like deepseek-chat or claude-3-5-haiku for inline autocomplete and doc generation, and save flagship models like claude-3-7-sonnet or deepseek-reasoner for full repository refactors.
  3. Keep a Local Fallback: Having Ollama configured locally guarantees you can write and debug code even during cloud API outages.
✉ Newsletter

Want to build production-ready AI?

Subscribe to StackMindset to receive actionable systems engineering checklists and code walkthroughs. No spam, only technical insights.

S

Written by S L Manikanta

AI Engineer specializing in agentic workflows, multi-step LLM validation pipelines, and secure cloud environments. Sharing practical lessons from building software.

Related Articles

ai-agents
The Shift to Agentic AI Workflows in Production

Why engineering teams are moving away from simple copilots to autonomous agentic workflows, and the technical challenges of long-running state management.

ai-agents
AI Agent Memory: Short-Term vs Long-Term Memory

A complete architectural breakdown of how AI agents manage state, covering short-term conversational context and long-term persistent memory systems.

ai-agents
AI Agent Observability: Logs, Traces, and Metrics in Production

A complete technical reference and implementation guide to observing agentic workflows, tracking LLM token costs, logging reasoning trajectories, tracing nested tool calls, and monitoring system metrics in production.