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

# Model Selection Guide

> Choose the right AI model for your Cline workflow based on coding capability, context window, speed, and cost.

Cline works with dozens of models across many providers. This guide cuts through the noise and helps you match the right model to your actual needs.

## What makes a model good for coding?

Not all models are built the same. When evaluating a model for use with Cline, four factors matter most:

<CardGroup cols={2}>
  <Card title="Coding capability" icon="code">
    How reliably the model writes correct, idiomatic code, follows instructions precisely, and uses Cline's tool-calling format without errors.
  </Card>

  <Card title="Context window" icon="layers">
    The maximum amount of text the model can process at once — conversation history, file contents, and tool outputs all count toward this limit.
  </Card>

  <Card title="Speed" icon="bolt">
    Time to first token and overall tokens-per-second. Slower models are fine for background tasks; interactive sessions benefit from faster models.
  </Card>

  <Card title="Cost" icon="circle-dollar-sign">
    Measured per million input/output tokens. A complex refactoring task might use 50K–200K tokens, so per-token cost adds up quickly at scale.
  </Card>
</CardGroup>

## Model recommendations

### For most users: Claude Sonnet 4.5

**Claude Sonnet 4.5** (via Anthropic direct or OpenRouter) is the most reliable choice for general coding work with Cline. It has the strongest tool-use accuracy in the ecosystem, handles complex multi-step tasks well, and supports a 200K token context window with optional 1M variants.

Use it when:

* You need consistent, reliable results on complex tasks
* You're working across multiple files or large codebases
* Tool-use reliability is more important than cost

### For complex, deep reasoning: Claude Opus 4

**Claude Opus 4** is Anthropic's most capable model. Use it for the hardest problems — architectural decisions, large-scale refactoring, debugging subtle logic errors — where cost is secondary.

### For cost-sensitive work: DeepSeek V3

**DeepSeek V3** delivers strong coding performance at a fraction of the cost of frontier models. It has a 128K context window and handles most routine tasks well. A good default for high-volume usage or experimentation.

### For large codebases: Gemini 2.5 Pro

**Gemini 2.5 Pro** offers a 1M+ token context window — the largest available. When you need to load entire repositories or process long documentation, Gemini's context advantage is meaningful.

### For speed: Qwen3 Coder on Cerebras

**Qwen3 Coder** served via Cerebras reaches over 2,600 tokens/second — dramatically faster than any cloud provider. If you need rapid iteration or interactive feel at low cost, this is the fastest option available.

### For privacy: local models via Ollama or LM Studio

If your code cannot leave your machine, run models locally. **Qwen3 Coder 30B** is the recommended local model — it has a 256K context window, strong tool-use, and runs on 32GB RAM with 4-bit quantization. See [Running Models Locally](/models/running-locally) for setup instructions.

### For general use: GPT-4o / GPT-5

**GPT-4o** and **GPT-5** are solid general-purpose options with 128K–400K context windows. GPT-5 is OpenAI's current flagship. Good choice if you're already using OpenAI and want to avoid managing multiple provider accounts.

## Model comparison table

| Model                 | Provider                 | Context window    | Coding strength | Speed     | Cost (input/M tokens) |
| --------------------- | ------------------------ | ----------------- | --------------- | --------- | --------------------- |
| **Claude Sonnet 4.5** | Anthropic                | 200K (1M variant) | Excellent       | Medium    | \~\$3                 |
| **Claude Opus 4**     | Anthropic                | 200K (1M variant) | Best            | Slow      | \~\$15                |
| **GPT-5**             | OpenAI                   | 400K              | Very good       | Medium    | \~\$10                |
| **GPT-4o**            | OpenAI                   | 128K              | Good            | Fast      | \~\$2.50              |
| **Gemini 2.5 Pro**    | Google                   | 1M+               | Very good       | Medium    | \~$1.25–$2.50         |
| **DeepSeek V3**       | DeepSeek / OpenRouter    | 128K              | Good            | Medium    | \~\$0.14              |
| **Qwen3 Coder**       | Cerebras / OpenRouter    | 256K              | Good            | Very fast | \~\$0.30              |
| **Qwen3 Coder 30B**   | Local (Ollama/LM Studio) | 256K              | Good            | Slow      | Free                  |

<Note>
  Pricing changes frequently. Always check the provider's current pricing page before making cost-based decisions.
</Note>

## How to choose: a decision framework

<AccordionGroup>
  <Accordion title="I want maximum reliability">
    Use **Claude Sonnet 4.5** via Anthropic direct. It has the most consistent tool-use behavior across complex, multi-step tasks. If you hit rate limits, access it through OpenRouter instead.
  </Accordion>

  <Accordion title="I want to minimize cost">
    Start with **DeepSeek V3** for routine tasks (bug fixes, small features, refactoring). Switch to a premium model only when you need deeper reasoning or encounter tool-use failures.
  </Accordion>

  <Accordion title="My codebase is very large">
    Use **Gemini 2.5 Pro** (1M context) or **Claude Sonnet 4.5 1M** when you need to load large portions of your repository. For most projects under 500 files, a 200K context model is sufficient.
  </Accordion>

  <Accordion title="I need fast, interactive responses">
    Use **Qwen3 Coder on Cerebras** for the fastest token generation available. Alternatively, **GPT-4o** and **Claude Haiku** are significantly faster than their flagship counterparts at lower cost.
  </Accordion>

  <Accordion title="My code is sensitive or private">
    Run a local model via Ollama or LM Studio. **Qwen3 Coder 30B** is the recommended choice — it's the most reliable local model for Cline's tool-use format. See [Running Models Locally](/models/running-locally).
  </Accordion>

  <Accordion title="I want open source models">
    Open source models like **Qwen3 Coder** (Apache 2.0), **DeepSeek series**, and **Kimi K2** can be self-hosted or accessed through multiple competing providers, which keeps costs down and avoids vendor lock-in.
  </Accordion>
</AccordionGroup>

## Plan Mode vs. Act Mode

Cline supports using different models for different modes. This is useful for balancing cost and capability:

* **Plan Mode** involves discussion and reasoning — a cheaper, faster model works well here.
* **Act Mode** involves executing changes to your codebase — use your most reliable model here.

A practical combination:

```
Plan Mode:  DeepSeek V3  — low-cost reasoning and discussion
Act Mode:   Claude Sonnet 4.5  — reliable tool use and implementation
```

Configure this in Cline Settings under the model selector.

## Quick decision matrix

| If you want...                | Use this                           |
| ----------------------------- | ---------------------------------- |
| Something that just works     | Claude Sonnet 4.5                  |
| Best possible output quality  | Claude Opus 4                      |
| Lowest cost                   | DeepSeek V3                        |
| Largest context window        | Gemini 2.5 Pro                     |
| Fastest responses             | Qwen3 Coder on Cerebras            |
| Complete privacy              | Qwen3 Coder 30B (local)            |
| Open source model             | Qwen3 Coder, DeepSeek, or Kimi K2  |
| Use your ChatGPT subscription | OpenAI Codex (sign in with OpenAI) |

## Next steps

<CardGroup cols={2}>
  <Card title="Cloud providers" icon="cloud" href="/models/cloud-providers">
    Set up API keys for Anthropic, OpenAI, OpenRouter, Google Gemini, and more.
  </Card>

  <Card title="Running locally" icon="server" href="/models/running-locally">
    Run models on your own hardware with Ollama or LM Studio.
  </Card>

  <Card title="Context windows" icon="layers" href="/models/context-windows">
    Understand context limits and how Cline helps you stay within them.
  </Card>
</CardGroup>
