Skip to main content
Cline is a strong agent-style coding extension for VS Code, especially for file edits, terminal execution, step-by-step planning, and multi-turn code changes. For Crazyrouter, the recommended path is Cline’s official OpenAI Compatible provider.

Overview

With the OpenAI Compatible provider, Cline can send its agent traffic to Crazyrouter:
  • recommended protocol: OpenAI-compatible API
  • base URL: https://crazyrouter.com/v1
  • auth format: sk-... token
  • recommended default models: claude-sonnet-4-6 or gpt-5.4
Cline can read and write files and execute terminal commands. After the connection works, the real risk is not connectivity but over-granting execution scope. Start with a small repo you know well.

Best For

  • users who want an agent-style coding workflow inside VS Code
  • code modification flows powered by Crazyrouter’s multi-model access
  • teams that want IDE agent traffic separated from CLI traffic
  • developers who want Claude, GPT, and other models behind one gateway

Protocol Used

Recommended protocol: OpenAI-compatible API In Cline settings, use:
  • API Provider: OpenAI Compatible
  • Base URL: https://crazyrouter.com/v1
  • API Key: your sk-...
  • Model ID: the model you want to use
Do not set the base URL to:
  • https://crazyrouter.com
  • https://crazyrouter.com/v1/chat/completions
Unlike Claude Code, Codex, or Aider, the normal Cline-in-VS-Code path usually does not require shell environment variables. In most cases, you only need to enter Base URL, API Key, and Model ID in the Cline settings UI.

Prerequisites

ItemNotes
Crazyrouter accountCreate one at crazyrouter.com
Crazyrouter tokenCreate a dedicated token for Cline
GitPrefer git 2.23+
VS CodeUse a current stable release
Cline extensionUse a current version
Allowed modelsAllow at least 1 to 2 models suitable for agentic coding
Environment variablesUsually not required for the standard VS Code setup
Suggested starter allowlist:
  • claude-sonnet-4-6
  • gpt-5.4
  • gemini-3-pro-preview

Full Install Path By Operating System

The most reliable Windows setup is: Git + VS Code + install Cline from the marketplace + enter Crazyrouter settings directly in Cline. Recommended order:
  1. Install Git
  2. Install VS Code
  3. Install Cline from the VS Code marketplace
  4. Create a Cline-specific Crazyrouter token
  5. Open your repo and take a Git snapshot first
  6. Fill in OpenAI Compatible, Base URL, API Key, and Model ID inside Cline
Recommended verification commands:
git --version
where.exe git
code --version
where.exe code
If code --version is not available but VS Code itself opens normally, Cline can still work fine. You just will not be able to open folders from the terminal with code yet. The smoothest macOS setup is usually: Xcode Command Line Tools + Homebrew + Git + VS Code + install Cline from the marketplace. Recommended order:
  1. Install Xcode Command Line Tools
  2. Install Homebrew if needed
  3. Install Git
  4. Install VS Code
  5. Install Cline in VS Code
  6. Enter the Crazyrouter settings directly inside Cline
Recommended verification commands:
git --version
which git
open -a "Visual Studio Code"
If you want the terminal code command, run Shell Command: Install 'code' command in PATH from the VS Code command palette, then verify:
code --version
which code

Linux Note

Linux users can generally follow the same pattern: install Git, install VS Code, then install Cline from the extension marketplace. A common Ubuntu / Debian path is:
sudo apt update
sudo apt install -y git
sudo snap install code --classic
git --version
code --version

Detailed Install Walkthrough

1

Step 1: Install Git

If Git is not installed yet, install it first.
winget install --id Git.Git -e --source winget
git --version
where.exe git
Recommended one-time identity setup:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
git config --global init.defaultBranch main
2

Step 2: Install VS Code

Cline is most commonly used as a VS Code extension.
winget install Microsoft.VisualStudioCode
code --version
where.exe code
After installation, open VS Code normally at least once.
3

Step 3: Install the Cline extension

In VS Code:
  1. Press Ctrl/Cmd + Shift + X
  2. Search for Cline
  3. Click Install
  4. Open Cline from the activity bar or from the command palette with Cline: Open In New Tab
If VS Code shows a prompt like Running extensions might..., allow it.If you do not see the Cline icon, restart VS Code and check again.
4

Step 4: Create a Cline-specific token

In Crazyrouter, create a token named something like cline. For the first pass, allow only:
  • claude-sonnet-4-6
  • gpt-5.4
  • gemini-3-pro-preview
The standard Cline-in-VS-Code path usually stores the API key in the UI rather than through shell env vars. The most important setup decisions here are a dedicated token and a narrow allowlist.
5

Step 5: Prepare the repo before the first real run

Cline can edit files and run commands, so take a repo snapshot before you trust it with real work.If this directory is not a Git repo yet:
git init
git add .
git commit -m "chore: initial snapshot before Cline"
If it is already an existing repo, inspect the current state first:
git status
6

Step 6: Enter the Crazyrouter settings in Cline

In the Cline settings panel, enter:
  • API Provider: OpenAI Compatible
  • Base URL: https://crazyrouter.com/v1
  • API Key: your sk-...
  • Model ID: start with claude-sonnet-4-6
If your current Cline version shows a Verify button, click it first to confirm the connection. If not, you can validate with a small read-only prompt instead.For the first pass, validate with only one model rather than switching across many models immediately.
7

Step 7: Run the first validation

Recommended validation order:
  1. Read the current workspace README and summarize it without changing any files.
  2. Point out the 3 files that are most worth reviewing first.
  3. Fix one obvious typo in the README only and show the diff.
Once those all work and Crazyrouter logs show the matching requests, the main path is stable.
8

Step 8: Widen permissions gradually

Only after the read-only and tiny-edit path is stable should you move to:
  1. small multi-file changes
  2. low-risk command execution
  3. larger agent-style refactors
Avoid starting with broad autonomous runs in a large unfamiliar repo.
Use caseRecommended modelWhy
default agent driverclaude-sonnet-4-6stable for multi-turn planning, code explanation, and long context
OpenAI-compatible baselinegpt-5.4verified successfully in production on March 23, 2026, and suited for the main OpenAI-compatible path
Gemini fallback pathgemini-3-pro-previewuseful as a second compatibility-validation path
Recommended rollout: get the workflow stable on claude-sonnet-4-6 first. If you also want an OpenAI-compatible baseline, add gpt-5.4 second.

Token Setup Best Practices

SettingRecommendationNotes
dedicated tokenRequiredDo not share Cline tokens with Cursor, Claude Code, or Aider
model allowlistStrongly recommendedCline is a higher-consumption tool, so narrow allowlists are safer
IP restrictionRecommended on fixed office networksUse carefully on laptops and mobile networks
quota capStrongly recommendedMulti-step agent runs can consume budget very quickly
environment splitRecommendedSeparate local VS Code, remote dev hosts, and team environments
permission splitStrongly recommendedHigh-risk repos should use their own low-budget token

Verification Checklist

  • git --version works
  • VS Code is installed correctly
  • if you want terminal repo opening, code --version also works
  • Cline is installed and opens correctly
  • Cline is set to the OpenAI Compatible provider
  • Base URL is https://crazyrouter.com/v1
  • API Key is entered correctly
  • Model ID is a real allowed model
  • the first read-only task succeeds
  • file edits or command flows work when expected
  • Crazyrouter logs show the matching requests

Common Errors And Fixes

SymptomLikely causeFix
the extension installs but no Cline icon appearsVS Code did not refresh or the extension was not activated cleanlyrestart VS Code and reopen Cline from the command palette
the code command does not existVS Code is installed but the shell command is not in PATHon Windows, reopen the terminal; on macOS, run Shell Command: Install 'code' command in PATH
401 unauthorizedwrong, expired, or badly pasted API keycreate a new token and paste it again
403 or model not allowedthe token does not allow the selected modelallow that model in Crazyrouter token settings
404base URL was set to the root domain or a full endpoint pathuse https://crazyrouter.com/v1
model not foundincorrect Model ID or unavailable modelswitch back to claude-sonnet-4-6 or another confirmed model
it cannot connect on a corporate networkproxy or firewall settings are blocking trafficcheck VS Code’s own proxy settings first; the Cline extension reuses VS Code’s proxy configuration
Cline edits the wrong filespermissions are too wide or the prompt scope is too loosevalidate with read-only tasks first, then widen permissions gradually
cost rises too fastmulti-step planning, large context, and auto executionnarrow the task scope and give Cline its own budget

Performance And Cost Tips

  • start with read-only tasks and small edits on first setup
  • use claude-sonnet-4-6 or gpt-5.4 for complex refactors
  • avoid widening the model list too early; keep the first-pass allowlist narrow
  • use different tokens for different workspaces or project types
  • after large tasks, inspect Crazyrouter logs to see the real cost pattern

FAQ

Which provider should I choose in Cline?

Choose OpenAI Compatible.

What base URL should I use?

Use https://crazyrouter.com/v1.

Do I have to set environment variables for this Cline path?

Usually no. The normal VS Code path generally works by entering Base URL, API Key, and Model ID directly in Cline’s settings UI.

Which model should I try first?

Start with claude-sonnet-4-6.

Why should I take a Git snapshot before the first real task?

Because Cline is a real coding agent that can edit files and run commands. A snapshot makes review and rollback much easier.

Why should I avoid broad permissions immediately?

Because the safest rollout pattern is read-only first, then tiny edits, then wider execution scope only after the integration is clearly stable.
If you want a true agent workflow inside VS Code, Cline is usually a better fit than Cursor’s BYOK path.