Use Xantly with Cline (VS Code)
Cline is the most popular AI coding agent for VS Code. Drop in Xantly as the OpenAI-compatible provider for BaRP routing, L2 semantic cache, and persistent memory across agent sessions.
Cline is the most popular AI coding agent for VS Code, full autonomous agent mode, file editing, terminal commands, plan/act split. Point it at Xantly and you get smart routing, semantic cache, and memory on every completion.
Prerequisites
- VS Code with the Cline extension installed
- A Xantly API key, create one
Setup
- Open Cline's settings panel (gear icon in the Cline sidebar).
- Under API Provider, select OpenAI Compatible.
- Fill in:
| Field | Value |
|---|---|
| Base URL | https://api.xantly.com/v1 |
| API Key | xantly_sk_... (your Xantly key) |
| Model ID | xantly/auto-quality (or any catalog model, see below) |
- Hit Save. Cline reloads the model list from
/v1/modelsand you're done.
Model choice
Cline's agent mode (plan → act → verify loop) benefits from strong tool-calling. Recommended:
| Model ID | Why |
|---|---|
xantly/auto-quality | BaRP routes from the T1 pool. Best agent performance. |
anthropic/claude-sonnet-4.6 | Pinned Claude. Strong tool-calling, great for complex multi-file refactors. |
openai/gpt-5.4 | Pinned GPT. Excellent at structured JSON outputs. |
xantly/auto-value | Budget-conscious daily driver. |
Don't use xantly/auto-speed for agent mode, T3 models trade tool-calling reliability for speed. Fine for inline chat, not for multi-step plans.
Verify tool-calling works
Cline's agent mode depends on OpenAI tool-call format. Xantly speaks it natively, but let's confirm end-to-end:
- Open a project in VS Code.
- Launch Cline, type: "Read package.json and tell me which dependencies are outdated. Then patch them."
- Cline should call the
read_filetool, think, and propose a patch.
If Cline silently stops after the first tool call, your model doesn't support parallel tool calls. Switch to xantly/auto-quality or anthropic/claude-sonnet-4.6.
What you get
- Waterfall fallback. Cline requests that error out (provider 500, timeout) are silently retried against the next-best model in the same tier.
- Semantic cache. Cline often re-asks similar questions across sessions ("how does this file work?"). L2 semantic cache returns instantly at near-zero cost.
- Memory across sessions. Xantly's L3 graph memory remembers prior project context. Cline can surface it via
X-Xantly-Memory-Mode: recall(see Memory & Context). - Cost transparency. Every Cline request shows up in your Xantly dashboard with cost, model, cache status.
Gotchas
"Model ID must include provider prefix." Cline expects OpenRouter-style IDs (anthropic/..., openai/...). Use the provider/model format, not bare model names. Xantly's xantly/auto-* aliases also work.
Base URL needs /v1 suffix. Don't use https://api.xantly.com (bare), Cline expects the full OpenAI-compatible base URL with /v1.
Auto-completion dropdown shows stale models. Cline caches the /v1/models response per session. Restart VS Code after you add new models to your Xantly catalog.
Next steps
- Roo Code, Cline fork with extra multi-agent features. Same config pattern.
- Kilo Code, another Cline fork, #1 IDE Extension on OpenRouter by token volume.
- Continue.dev, per-role config (chat / edit / autocomplete separately). Great for "Xantly for chat, Ollama for autocomplete" hybrid setups.
- Bring Your Own Key, use your own provider credits through Xantly's routing.