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-6orgpt-5.4
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 CompatibleBase URL:https://crazyrouter.com/v1API Key: yoursk-...Model ID: the model you want to use
https://crazyrouter.comhttps://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
| Item | Notes |
|---|---|
| Crazyrouter account | Create one at crazyrouter.com |
| Crazyrouter token | Create a dedicated token for Cline |
| Git | Prefer git 2.23+ |
| VS Code | Use a current stable release |
| Cline extension | Use a current version |
| Allowed models | Allow at least 1 to 2 models suitable for agentic coding |
| Environment variables | Usually not required for the standard VS Code setup |
claude-sonnet-4-6gpt-5.4gemini-3-pro-preview
Full Install Path By Operating System
Recommended Windows Path
The most reliable Windows setup is:Git + VS Code + install Cline from the marketplace + enter Crazyrouter settings directly in Cline.
Recommended order:
- Install Git
- Install VS Code
- Install Cline from the VS Code marketplace
- Create a Cline-specific Crazyrouter token
- Open your repo and take a Git snapshot first
- Fill in
OpenAI Compatible,Base URL,API Key, andModel IDinside Cline
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.
Recommended macOS Path
The smoothest macOS setup is usually:Xcode Command Line Tools + Homebrew + Git + VS Code + install Cline from the marketplace.
Recommended order:
- Install Xcode Command Line Tools
- Install Homebrew if needed
- Install Git
- Install VS Code
- Install Cline in VS Code
- Enter the Crazyrouter settings directly inside Cline
code command, run Shell Command: Install 'code' command in PATH from the VS Code command palette, then verify:
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:Detailed Install Walkthrough
Step 1: Install Git
If Git is not installed yet, install it first.Recommended one-time identity setup:
- Windows PowerShell
- macOS
- Ubuntu / Debian
Step 2: Install VS Code
Cline is most commonly used as a VS Code extension.After installation, open VS Code normally at least once.
- Windows PowerShell
- macOS
- Ubuntu / Debian
Step 3: Install the Cline extension
In VS Code:
- Press
Ctrl/Cmd + Shift + X - Search for
Cline - Click Install
- Open Cline from the activity bar or from the command palette with
Cline: Open In New Tab
Running extensions might..., allow it.If you do not see the Cline icon, restart VS Code and check again.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-6gpt-5.4gemini-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.
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:If it is already an existing repo, inspect the current state first:
Step 6: Enter the Crazyrouter settings in Cline
In the Cline settings panel, enter:
API Provider:OpenAI CompatibleBase URL:https://crazyrouter.com/v1API Key: yoursk-...Model ID: start withclaude-sonnet-4-6
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.Step 7: Run the first validation
Recommended validation order:
Read the current workspace README and summarize it without changing any files.Point out the 3 files that are most worth reviewing first.Fix one obvious typo in the README only and show the diff.
Recommended Model Setup
| Use case | Recommended model | Why |
|---|---|---|
| default agent driver | claude-sonnet-4-6 | stable for multi-turn planning, code explanation, and long context |
| OpenAI-compatible baseline | gpt-5.4 | verified successfully in production on March 23, 2026, and suited for the main OpenAI-compatible path |
| Gemini fallback path | gemini-3-pro-preview | useful as a second compatibility-validation path |
claude-sonnet-4-6 first. If you also want an OpenAI-compatible baseline, add gpt-5.4 second.
Token Setup Best Practices
| Setting | Recommendation | Notes |
|---|---|---|
| dedicated token | Required | Do not share Cline tokens with Cursor, Claude Code, or Aider |
| model allowlist | Strongly recommended | Cline is a higher-consumption tool, so narrow allowlists are safer |
| IP restriction | Recommended on fixed office networks | Use carefully on laptops and mobile networks |
| quota cap | Strongly recommended | Multi-step agent runs can consume budget very quickly |
| environment split | Recommended | Separate local VS Code, remote dev hosts, and team environments |
| permission split | Strongly recommended | High-risk repos should use their own low-budget token |
Verification Checklist
-
git --versionworks - VS Code is installed correctly
- if you want terminal repo opening,
code --versionalso works - Cline is installed and opens correctly
- Cline is set to the
OpenAI Compatibleprovider -
Base URLishttps://crazyrouter.com/v1 -
API Keyis entered correctly -
Model IDis 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
| Symptom | Likely cause | Fix |
|---|---|---|
| the extension installs but no Cline icon appears | VS Code did not refresh or the extension was not activated cleanly | restart VS Code and reopen Cline from the command palette |
the code command does not exist | VS Code is installed but the shell command is not in PATH | on Windows, reopen the terminal; on macOS, run Shell Command: Install 'code' command in PATH |
401 unauthorized | wrong, expired, or badly pasted API key | create a new token and paste it again |
403 or model not allowed | the token does not allow the selected model | allow that model in Crazyrouter token settings |
404 | base URL was set to the root domain or a full endpoint path | use https://crazyrouter.com/v1 |
model not found | incorrect Model ID or unavailable model | switch back to claude-sonnet-4-6 or another confirmed model |
| it cannot connect on a corporate network | proxy or firewall settings are blocking traffic | check VS Code’s own proxy settings first; the Cline extension reuses VS Code’s proxy configuration |
| Cline edits the wrong files | permissions are too wide or the prompt scope is too loose | validate with read-only tasks first, then widen permissions gradually |
| cost rises too fast | multi-step planning, large context, and auto execution | narrow 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-6orgpt-5.4for 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?
ChooseOpenAI Compatible.
What base URL should I use?
Usehttps://crazyrouter.com/v1.
Do I have to set environment variables for this Cline path?
Usually no. The normal VS Code path generally works by enteringBase URL, API Key, and Model ID directly in Cline’s settings UI.
Which model should I try first?
Start withclaude-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.