Integrations
Cline (VS Code extension)
Configure the Cline VS Code agent to use Claude, GPT and other models through ToRouter.
Cline is an agentic coding extension for VS Code. It supports an OpenAI Compatible provider mode, which routes cleanly through ToRouter to Claude, GPT, Gemini and the rest of the catalog.
Configuration
| Field | Value |
|---|---|
| API Provider | OpenAI Compatible |
| Base URL | https://portal.torouter.ai/v1 |
| API Key | sk-*** |
| Model ID | e.g. claude-opus-4-7, gpt-5, gemini-2.5-pro |
Walkthrough
Install Cline
Open VS Code → Extensions → search Cline → install.
Open Cline settings
Click the Cline icon in the activity bar → gear icon (Settings) at the top of the Cline panel.
Pick OpenAI Compatible
Under API Provider choose OpenAI Compatible.
Fill in ToRouter
- Base URL:
https://portal.torouter.ai/v1 - API Key:
sk-*** - Model ID: paste a model id from the catalog, e.g.
claude-opus-4-7
Click Done.
Send a test message
In the Cline chat, ask say hello to confirm the round-trip works. Token usage is reported in the panel.
Gotchas
- Cline's Model ID must match a model id from the ToRouter catalog exactly. Typos return a
model_not_founderror. - For agentic / tool-use flows, prefer Claude (
claude-opus-4-7,claude-sonnet-4-5) or GPT-5 — Cline relies heavily on tool calling and these have the best track record. - Set per-model context window in Cline settings if the default is too low for big repos; the gateway forwards full context unmodified.
- The Anthropic provider slot also works — use base URL
https://portal.torouter.aiand the same key.