---
title: "Continue integration"
description: "Settings for using Continue with MiniRouter."
canonical_url: "https://minirouter.sh/docs/integrations/continue"
markdown_url: "https://minirouter.sh/docs/integrations/continue.md"
last_updated: "2026-09-26"
---

# Continue

Run Continue's chat, edit and agent on any model in the MiniRouter catalog.

[Get a key](https://minirouter.sh/key)

[Continue](https://docs.continue.dev) is an open-source coding agent for VS Code, JetBrains and the terminal. Add MiniRouter models to its `config.yaml` through the `openai` provider to use any model in the [catalog](https://minirouter.sh/models), or a [router](https://minirouter.sh/docs/auto-router), with one balance and per-key [spend limits](https://minirouter.sh/docs/rate-limits).

## Quick start

### 1. Install Continue

**VS Code**

```sh
code --install-extension Continue.continue
```

**JetBrains**

Settings → Plugins → Marketplace, search Continue, then Install.

**CLI**

```sh
npm i -g @continuedev/cli
```

### 2. Create a key

[Create a key](https://minirouter.sh/key) for Continue.

> **Tip:** Give Continue its own key, so its spend shows separately in [Usage](https://minirouter.sh/dashboard/usage) and a limit stops only Continue.

### 3. Add the models

Open ~/.continue/config.yaml (or the gear icon → Configure) and add the entries under `models`. Replace the key.

```yaml
models:
  - name: GLM 5.3 Flash (minirouter)
    provider: openai
    model: zai/glm-5.3-flash
    apiBase: https://api.minirouter.sh/v1
    apiKey: mr-live-YOUR-KEY-HERE
    roles: [chat, edit, apply]
  - name: GPT 5.6 Sol (minirouter)
    provider: openai
    model: openai/gpt-5.6-sol
    apiBase: https://api.minirouter.sh/v1
    apiKey: mr-live-YOUR-KEY-HERE
    roles: [chat, edit, apply]
```

> **Warning:** A new file also needs `name`, `version` and `schema: v1` at the top. On Windows the file is `%USERPROFILE%\.continue\config.yaml`.

### 4. Send a prompt

Pick a MiniRouter model from Continue's model dropdown, send one prompt, then open [Activity](https://minirouter.sh/dashboard/activity). The request lists its model, tokens and exact cost.

## Keep the key out of config

Continue reads secrets from `~/.continue/.env`, so `config.yaml` can be shared.

1. Add `MINIROUTER_KEY=mr-live-…` to `~/.continue/.env`.
2. Set `apiKey: ${{ secrets.MINIROUTER_KEY }}` on each model.

```yaml
models:
  - name: GLM 5.3 Flash (minirouter)
    provider: openai
    model: zai/glm-5.3-flash
    apiBase: https://api.minirouter.sh/v1
    apiKey: ${{ secrets.MINIROUTER_KEY }}
    roles: [chat, edit, apply]
    defaultCompletionOptions:
      contextLength: 1000000
```

Copy `contextLength` from the model's page in [Models](https://minirouter.sh/models).

## Roles

`roles` decides where Continue offers each model. A cheaper model can take `edit` and `apply`.

| Role | Used for |
| --- | --- |
| `chat` | Chat and Agent mode. |
| `edit` | Rewriting a selection in place. |
| `apply` | Applying a suggested change to the file. |

> **Note:** Agent mode needs tool calling. If a model is missing there, add `capabilities: [tool_use]` to its entry.

## Routers and presets

Add each as its own model entry, then pick it from the model dropdown.

| model | Uses |
| --- | --- |
| `minirouter/auto:code` | Picks a model with reliable tool calling. See [Auto router](https://minirouter.sh/docs/auto-router). |
| `minirouter/auto:cheap` | Cheapest model that still answers well. |
| `@preset/your-slug` | Your saved models and instructions. See [Presets](https://minirouter.sh/docs/presets). |

A [preset](https://minirouter.sh/docs/presets) lets you change the model from the dashboard without editing `config.yaml`.

## Run headless

`cn -p` runs one prompt without the TUI. It reads `~/.continue/config.yaml` unless you pass `--config`.

```sh
cn --config ./config.yaml -p "Generate a commit message for current changes"
```

| Flag | Does |
| --- | --- |
| `-p` | Runs headless, for scripts and CI. |
| `--config` | Uses another config file. |

- [Own key](https://minirouter.sh/dashboard/keys): Give scripts and CI their own key.
- [Spend cap](https://minirouter.sh/docs/rate-limits): Daily or monthly cap on that key.

## Recommended models

| Model | Why |
| --- | --- |
| [`zai/glm-5.3-flash`](https://minirouter.sh/models/zai/glm-5.3-flash) | Best current balance of coding ability, agentic performance, context and cost. |
| [`openai/gpt-5.6-sol`](https://minirouter.sh/models/openai/gpt-5.6-sol) | Higher-intelligence option when task quality matters more than spend. |
| [`spacexai/grok-4.6`](https://minirouter.sh/models/spacexai/grok-4.6) | Strong agentic alternative with a 500K-token window. |
| [`google/gemini-3.8-flash`](https://minirouter.sh/models/google/gemini-3.8-flash) | Multimodal coding alternative with a 1M-token window. |

Browse every model in the [catalog](https://minirouter.sh/models).

## Troubleshooting

### 404, HTML, or a parse error on every request

Almost always the base URL. Use https://api.minirouter.sh/v1 — the bare host without /v1 also works, but never append /chat/completions to the base URL field; the client adds that path itself.

Error: [400 `invalid_request`](https://minirouter.sh/docs/errors#invalid_request).

### 401 on every request

Wrong or rotated key. Keys start with mr-live-; after a rotation the old key keeps working for 24 hours, then dies.

Error: [401 `invalid_api_key`](https://minirouter.sh/docs/errors#invalid_api_key).

### 402 before any tokens arrive

Balance below the estimated cost of the request. Top up (from $0.50 with direct Solana payments) — and watch the x-minirouter-balance-usd header, the low-balance signal every response carries.

Error: [402 `insufficient_credits`](https://minirouter.sh/docs/errors#insufficient_credits).

### Autocomplete is slow or absent

If your installed version supports a separate autocomplete role, choose a suitable model from the current live catalog.

Every error code, with its fix: [Errors](https://minirouter.sh/docs/errors).

## Next steps

- [Presets](https://minirouter.sh/docs/presets): Save a model and its settings under one name.
- [Guardrails](https://minirouter.sh/docs/guardrails): Budgets and model lists per key.
- [Auto router](https://minirouter.sh/docs/auto-router): Let MiniRouter pick the model.
