Automation & toolsAny device6 min read

How to Use DeepSeek and Qwen in Cline and Roo Code in 2026 (OpenAI-Compatible Provider)

In Cline or Roo Code, set API Provider to OpenAI Compatible, then enter the Base URL, API Key and model ID. DeepSeek V4.1 Flash runs from $0.039 in.

On this page
  1. Pick a host
  2. Set it up in Cline
  3. Set it up in Roo Code
  4. What a month costs
  5. Use Off Grid AI Boost in Cline and Roo Code
  6. Not working? Symptom, check, fix
  7. FAQ

To use DeepSeek or Qwen in Cline or Roo Code, open settings with the gear icon, set API Provider to OpenAI Compatible, and fill in Base URL, API Key and Model from your host. The cheapest DeepSeek V4.1 Flash is NanoGPT at $0.039 in, $0.40 out per million tokens. Boost puts both models on one flat-price key from January.

See the Boost plans

Pick a host

Cline and Roo Code don’t care which host you use, as long as it speaks the OpenAI API. Pick on price and on which models you want behind one key. Prices are per million tokens, input / output, each linked to the host’s pricing page.

Host Base URL DeepSeek V4.1 Flash: ID and price Qwen3.8-27B: ID and price
NanoGPT https://api.nano-gpt.com/api/v1 deepseek/deepseek-v4.1-flash, $0.039 / $0.40 qwen/qwen3.8-27b, $0.15 / $0.70
DeepInfra https://api.deepinfra.com/v1/openai deepseek-ai/DeepSeek-V4.1-Flash, $0.14 / $0.42 Qwen/Qwen3.8-27B, $0.15 / $1.875
Hugging Face https://router.huggingface.co/v1 deepseek-ai/DeepSeek-V4.1-Flash:cheapest, from $0.051 / $0.567 Qwen/Qwen3.8-27B:cheapest, from $0.04 / $1.35
OpenRouter https://openrouter.ai/api/v1 deepseek/deepseek-v4.1-flash, $0.051 / $0.567 + 5.5% fee qwen/qwen3.8-27b, $0.039 / $1.25 + 5.5% fee
DeepSeek API https://api.deepseek.com deepseek-flash, $0.30 / $1.20 peak, half off-peak Not served
Off Grid AI Boost Arrives with your key Arrives with your key Flat plan from $4.99 a month, usage worth twice the price

Base URLs come from each host’s docs: NanoGPT, DeepInfra, Hugging Face, OpenRouter and DeepSeek. NanoGPT, DeepInfra, Hugging Face and OpenRouter serve both models on one key. DeepSeek’s own API only serves DeepSeek.

Set it up in Cline

From Cline’s OpenAI-compatible provider docs:

  1. Click the ⚙️ icon in the Cline panel to open settings.
  2. Set API Provider to OpenAI Compatible.
  3. Paste the host’s URL into Base URL, for example https://api.nano-gpt.com/api/v1. It won’t be https://api.openai.com/v1.
  4. Paste your key into API Key.
  5. Type the model ID into Model, for example qwen/qwen3.8-27b.
  6. Open Model Configuration and set Context Window size, Max Output Tokens, Input Price and Output Price from the host’s model page. Turn on Image Support only for a vision model.

Then send Cline a small task, like “list the files in this folder”. A normal answer means the URL, key and model ID match.

DeepSeek has its own provider too. Cline’s DeepSeek page says: set API Provider to DeepSeek, paste your key into DeepSeek API Key, and choose from the Model dropdown. If the dropdown doesn’t list deepseek-flash, the name DeepSeek’s API docs now use for V4.1 Flash, use OpenAI Compatible with https://api.deepseek.com instead.

Set it up in Roo Code

Roo Code’s OpenAI-compatible docs use the same labels:

  1. Click the gear icon in the Roo Code panel.
  2. Set API Provider to OpenAI Compatible.
  3. Enter the host’s endpoint in Base URL.
  4. Paste your key into API Key.
  5. Choose or type the model ID under Model.
  6. Under Model Configuration, set Context Window, Max Output Tokens, Input Price and Output Price.

Roo Code also has a DeepSeek provider, set up the same way with a DeepSeek API Key field, per its DeepSeek page. That page lists deepseek-chat and deepseek-reasoner. DeepSeek’s current docs name V4.1 Flash deepseek-flash, so if you want that model by its current name, use OpenAI Compatible.

Run DeepSeek and Qwen side by side

Pick a host that serves both, like NanoGPT or DeepInfra, and one key covers DeepSeek V4.1 Flash and Qwen3.8-27B. Switching between them means changing only the Model field. DeepSeek is the cheaper default for everyday edits; Qwen is there when you want a second model on a task.

What a month costs

Coding agents read far more than they write. Say yours sends 3M tokens a day, 3 input for every output: 67.5M in and 22.5M out a month.

Setup Arithmetic Month
DeepSeek V4.1 Flash on NanoGPT 67.5 × $0.039 + 22.5 × $0.40 $11.63
DeepSeek V4.1 Flash on DeepInfra 67.5 × $0.14 + 22.5 × $0.42 $18.90
Qwen3.8-27B on NanoGPT 67.5 × $0.15 + 22.5 × $0.70 $25.88
DeepSeek API, peak 67.5 × $0.30 + 22.5 × $1.20 $47.25
Boost Pro, cohort 1 Flat $9.99, with $19.99 of usage included

An agent that loops on a failing test pays for every retry, which is the case for a flat bill. Every model and host is on the API price index.

Use Off Grid AI Boost in Cline and Roo Code

Boost is one OpenAI-compatible key for open models, with Qwen 3.8 and DeepSeek V4.1 Flash named on the page. In either tool:

  1. API Provider: OpenAI Compatible.
  2. Base URL: the Boost URL from your key email. It isn’t published yet.
  3. API Key: your Boost key.
  4. Model: the Boost model ID for DeepSeek or Qwen, listed with your key.

Plans are flat: Starter $4.99, Pro $9.99 or Max $49.99 a month for cohort 1, half the regular price for as long as you stay. Each includes usage worth its full regular price every month, counted at each model’s token rate, and you can top up any time. “We don’t keep your prompts or train on them.”

Boost is a pre-order. Your key arrives in January 2027 and your plan starts that day; if it misses January, you get all your money back. Set up NanoGPT or DeepInfra today and swap the three fields when your key lands. For other flat plans that are live now, see OpenRouter alternatives with a monthly subscription.

Not working? Symptom, check, fix

Symptom Check Fix
404 on every request The Base URL includes /chat/completions or misses /v1 Copy the Base URL exactly from the table
“Model not found” Model IDs differ per host qwen/qwen3.8-27b on NanoGPT and OpenRouter, Qwen/Qwen3.8-27B on DeepInfra and Hugging Face
401 The key belongs to a different host than the Base URL Match the key to the host
401 on Hugging Face The token lacks the Inference Providers permission Create a fine-grained token with Make calls to Inference Providers
OpenRouter bill is higher than the table Default routing doesn’t always pick the cheapest host, and credits carry a 5.5% fee Add :floor to the model ID, or use NanoGPT or Hugging Face
DeepSeek dropdown shows old model names The provider list lags the API Use OpenAI Compatible with deepseek-flash

FAQ

How do I use DeepSeek in Cline? Open Cline’s settings with the gear icon. Either pick DeepSeek as the API Provider and paste your key into DeepSeek API Key, or pick OpenAI Compatible and enter https://api.deepseek.com as the Base URL with the model ID deepseek-flash.

How do I add an OpenAI-compatible provider in Roo Code? Open Roo Code’s settings with the gear icon, set API Provider to OpenAI Compatible, then fill in Base URL, API Key and Model. Under Model Configuration you can set the context window, max output tokens and prices.

How do I use Qwen in Cline or Roo Code? Use the OpenAI Compatible provider with a host that serves Qwen3.8-27B. On NanoGPT the Base URL is https://api.nano-gpt.com/api/v1 and the model ID is qwen/qwen3.8-27b. On DeepInfra it’s https://api.deepinfra.com/v1/openai with Qwen/Qwen3.8-27B.

Is DeepSeek or Qwen cheaper in Cline and Roo Code? DeepSeek V4.1 Flash. On NanoGPT it costs $0.039 in and $0.40 out per million tokens, against $0.15 in and $0.70 out for Qwen3.8-27B. For a month of 67.5M input and 22.5M output tokens, that’s $11.63 against $25.88.

Can I use Off Grid AI Boost in Cline or Roo Code? Yes, through OpenAI Compatible. Boost is a pre-order, so your key, base URL and model IDs arrive by email in January 2027. Until then, use DeepSeek’s API, NanoGPT or DeepInfra.

Using Cursor or a terminal agent instead? See DeepSeek in Cursor and open models in Aider and Continue.

Pre-order Boost from $4.99

DID THIS LAND?
UPDATES FROM THE CREATOR