VS Code — Cline & Continue
Connect Cline or Continue on Windows, macOS, and Linux, with a legacy note for discontinued Roo Code.
On this page
Set it up with your coding agent #
Paste your key into the prompt's key field, then copy the prompt into Claude Code, Codex, Cursor, or any coding agent. It configures the tool and keeps testing until a real request goes through RouterPlex, fixing environment problems along the way. Prefer to do it by hand? Follow the manual setup below; your key fills those commands too.
Optional. It stays in this browser tab and is never saved or sent. No key yet? Create one in guided setup.
Set up Cline or Continue in VS Code on this machine to use RouterPlex, an OpenAI- and Anthropic-compatible AI gateway. Keep working until a real request from Cline or Continue in VS Code succeeds through RouterPlex.My RouterPlex API key: YOUR_ROUTERPLEX_API_KEYKey handling:- If the key line above is a placeholder rather than a real key (real keys start with sk-), use my ROUTERPLEX_API_KEY environment variable. If that is empty too, ask me for the key once, then continue.- Store the key only in user-level config or my user environment. Never put it in a project file, never commit it, and do not repeat the full key in your replies.Full guide: https://docs.routerplex.com/vscodeStep 1. Prove the key and the RouterPlex gateway work before changing anything else. Run:curl -sS https://api.routerplex.com/v1/chat/completions -H "Authorization: Bearer YOUR_ROUTERPLEX_API_KEY" -H "Content-Type: application/json" -d '{"model":"claude-sonnet-4-6","max_tokens":32,"messages":[{"role":"user","content":"Reply with exactly: RouterPlex connected."}]}'On Windows PowerShell, use curl.exe with the body in a file, or Invoke-RestMethod.- A reply containing "RouterPlex connected.": go on.- 401: the key is wrong or revoked. Stop and ask me for a correct key.- 402: my balance or trial credit is used up. 403: this key reached its own spending limit. Stop and tell me; retrying cannot fix these.- Network, DNS, TLS, or proxy errors: find and fix the cause (proxy variables, VPN, firewall, system clock, outdated CA certificates), then run it again.Step 2. Configure Cline or Continue in VS Code:- Run code --list-extensions to see whether I use Cline (saoudrizwan.claude-dev) or Continue (continue.continue).- Continue: add this model to my user-level ~/.continue/config.yaml (Windows: %USERPROFILE%\.continue\config.yaml). Append it to the existing models list, or create the file with name, version: 1.0.0, and schema: v1 headers:- name: RouterPlex Sonnetprovider: openaimodel: claude-sonnet-4-6apiBase: https://api.routerplex.com/v1apiKey: <key>roles: [chat, edit, apply]capabilities: [tool_use, image_input]defaultCompletionOptions:contextLength: 1000000maxTokens: 4096- Cline keeps its settings in VS Code's own storage, so I have to enter them. Tell me to open the gear in Cline's panel, choose OpenAI Compatible, and enter Base URL https://api.routerplex.com/v1, API Key <key>, Model ID claude-sonnet-4-6, in both Plan and Act settings if they are separate.Step 3. Test Cline or Continue in VS Code itself from a new terminal or a restarted app, so you test the saved setup rather than the shell you changed:Ask me to reload VS Code, start a new chat (selecting RouterPlex Sonnet in Continue), send this, and report the reply: Reply with exactly: RouterPlex connected.Expected reply: "RouterPlex connected."Step 4. If step 1 works but step 3 fails, the problem is Cline or Continue in VS Code's configuration or environment, not RouterPlex. Check these, fix what is wrong, and repeat step 3:- The key or base URL is set in one place but not where Cline or Continue in VS Code starts: zsh vs bash startup files, login vs non-login shells, a desktop launcher, a background service, Windows vs WSL, or a remote SSH or container environment.- Another setting wins: OPENAI_API_KEY, OPENAI_BASE_URL, OPENAI_API_BASE, ANTHROPIC_API_KEY, ANTHROPIC_BASE_URL, or a project-level config that overrides the user-level one.- Cline or Continue in VS Code is outdated, or still needs a full restart to read the new settings.- If an environment variable cannot be made to reach Cline or Continue in VS Code reliably and Cline or Continue in VS Code accepts a key in its user-level config, put the key there instead.Keep repeating steps 3 and 4 until the test reply comes back. Stop early only for a 401, 402, or 403, or for a step only I can do, such as a click in a settings window or a login. Then tell me exactly what to do, wait for me, and continue testing afterwards.When it works, tell me which files you changed, where the key is stored, and the final test output.
Manual setup #
Cline and Continue can use RouterPlex's OpenAI-compatible API. Roo Code is retained below for existing installations as a legacy integration. Install Cline or Continue from the VS Code Extensions view: Cmd+Shift+X on macOS, Ctrl+Shift+X on Windows/Linux.
Create a separate RouterPlex key per extension. In a Remote SSH, WSL, or Dev Container window, install/configure the extension in the environment that runs it. The provider fields are the same across operating systems.
Cline #
Open the gear icon in Cline's panel, select OpenAI Compatible, and fill in:
Base URL: https://api.routerplex.com/v1API Key: YOUR_ROUTERPLEX_API_KEYModel ID: claude-sonnet-4-6
If asked for model capabilities, use the catalog. For this Sonnet example, the listed context is 1,000,000 tokens and image/tool input is supported. A modest initial max output of 4,096 tokens is enough for a connection test.
Check both Plan and Act settings if you configure them separately. Both need a RouterPlex-compatible provider and an allowed model.
Roo Code — legacy #
Roo Code is discontinued. Its official repository is archived, and the maintainer states that the extension shut down on May 15, 2026. Use Cline or Continue for a new setup. The fields below are historical guidance for an existing installation, not a claim of current support. See the maintainer notice.
In an existing Roo Code installation, select OpenAI Compatible and enter the same base URL, key, and model ID above. Save the profile and select it for the mode you are using.
Roo requires native tool calling. Choose a model with tool support in the catalog. A plain text-only chat model is not sufficient for Roo's agent loop. Match the context, output, and image settings to the selected model rather than enabling every capability.
Continue #
Open Continue's local configuration from its settings UI. Default locations:
- macOS/Linux:
~/.continue/config.yaml - Windows:
%USERPROFILE%\.continue\config.yaml
For a new local config, use this complete example. If you already have a config, keep its header and append the model to its existing models list.
name: RouterPlexversion: 1.0.0schema: v1models:- name: RouterPlex Sonnetprovider: openaimodel: claude-sonnet-4-6apiBase: https://api.routerplex.com/v1apiKey: YOUR_ROUTERPLEX_API_KEYroles: [chat, edit, apply]capabilities: [tool_use, image_input]defaultCompletionOptions:contextLength: 1000000maxTokens: 4096
Replace the key placeholder locally. This file contains a credential once filled in: keep it outside version control, or use Continue's secret configuration. Reload Continue and select RouterPlex Sonnet. This example does not configure autocomplete or embeddings.
Verify each extension #
Start with a new chat and ask Reply with exactly: RouterPlex connected. Check Usage for the matching key and model. Then try reading a small disposable test file to verify the extension's tool loop before giving it a larger task.
A successful chat confirms the connection; it does not establish every agent, image, or edit feature for every model. See Errors for key, budget, and model failures.
A Cline-only walkthrough of the same OpenAI Compatible fields is in Cline OpenAI-compatible setup.
Official references: Cline, Roo Code, Continue YAML reference.