Continue.dev with KeepRouter: config.yaml and OpenRouter migration
Configure Continue with provider: openai, apiBase: https://keeprouter.com/v1, a scoped KeepRouter key, and an exact chat-compatible model ID from /models. Continue's current preferred format is config.yaml; legacy config.json examples should be migrated instead of copied into a new setup.
Working config.yaml
name: KeepRouter coding models
version: 1.0.0
schema: v1
models:
- name: KeepRouter DeepSeek V4 Pro
provider: openai
apiBase: https://keeprouter.com/v1
apiKey: ${{ secrets.KEEPROUTER_API_KEY }}
model: deepseek-v4-pro
roles:
- chat
useResponsesApi: falseFor an IDE extension, put KEEPROUTER_API_KEY in an ignored workspace .env, workspace .continue/.env, or global ~/.continue/.env. For the Continue CLI, a process environment variable also works. Continue resolves the secret reference from those locations; never commit a paid key or its .env file.
Where the file lives
| Surface | Default local path | Reload |
|---|---|---|
| Continue IDE extension on macOS or Linux | ~/.continue/config.yaml | Save the file or use Reload config in the config selector |
| Continue IDE extension on Windows | %USERPROFILE%\.continue\config.yaml | Save the file or use Reload config |
| Continue CLI | ~/.continue/config.yaml | Start cn again or switch with /config |
Continue's docs also let the CLI select a file with cn --config ./my-config.yaml.
What each field controls
| Field | Purpose | KeepRouter rule |
|---|---|---|
provider: openai | Uses Continue's OpenAI-compatible client | Keep this for the public chat-compatible route |
apiBase | API root | Use https://keeprouter.com/v1, not the complete chat URL |
apiKey | Authentication | Reference a scoped secret |
model | Exact catalog ID | Copy from the live KeepRouter model page, not another service |
roles | Continue features that can select the model | Start with chat; add edit/apply or autocomplete only after a role-specific test |
capabilities | Adds capability hints | Omit it initially; add tool_use only after the model and route pass a real tool round trip |
useResponsesApi | Selects Responses instead of Chat Completions for some model families | Set false for a Chat Completions configuration unless the exact model has a tested Responses route |
Continue says capability overrides add to its autodetection; an empty list does not disable a capability. Treat the model and route test as authoritative.
Migrate from OpenRouter
| OpenRouter config concern | KeepRouter change |
|---|---|
| OpenRouter provider or API base | Use provider: openai and https://keeprouter.com/v1 |
OPENROUTER_API_KEY | Replace with a scoped KeepRouter secret |
| OpenRouter model slug | Map to an exact KeepRouter catalog ID |
| Provider routing, ZDR, fallback, variants | Remove; KeepRouter does not expose equivalent self-serve request fields |
| OpenRouter attribution headers | Remove unless the target contract documents them |
| Roles and tool capability | Re-evaluate against the chosen KeepRouter model |
Do not change only the Base URL. Model namespaces and product-specific provider options do not transfer. The OpenRouter versus KeepRouter comparison explains the operating-model difference.
Verify before Agent mode
- Reload the Continue config and confirm the named model appears once.
- Send a deterministic chat prompt and verify the request in KeepRouter usage.
- Run one edit on a disposable file and review the proposed diff.
- Run one harmless tool call. Agent mode needs complete tool-call and tool-result behavior, not only a capability label.
- Cancel one streaming response and confirm the client stops cleanly.
- Record HTTP errors, selected model, usage, and charge before expanding roles.
Troubleshooting
| Symptom | Check |
|---|---|
| Config does not load | YAML indentation, required name/version/schema, and the current config path |
| Secret is empty | Continue secret name matches KEEPROUTER_API_KEY and was stored in the active config context |
| 401 | Key scope, revocation, whitespace, and destination host |
| 404 | apiBase is exactly https://keeprouter.com/v1, without /chat/completions |
| Model not found | Exact current KeepRouter model ID and a supported chat endpoint |
| Continue calls Responses unexpectedly | Set useResponsesApi: false for a Chat Completions route |
| Agent mode unavailable | Model supports tool calls, capability is detected or added, and Continue has reloaded the config |
| Tool call begins but cannot finish | Tool result and message history are preserved, route supports the schema, and the exact model passes the round trip |
| Autocomplete feels slow or expensive | Use a separately evaluated autocomplete model and role; do not assume a chat model is a good autocomplete choice |
Security and cost boundary
Use a different key for Continue than for a production service. Restrict it to evaluated coding models and rotate it independently. Continue can collect local development data under its own configuration, while the model request follows the configured API path. Review both layers when handling private repositories.
FAQ
What provider should Continue use for KeepRouter? Use provider: openai for an OpenAI-compatible chat route.
What is the apiBase? https://keeprouter.com/v1.
Should I use config.json? Continue currently recommends config.yaml; config.json is a legacy format.
Can I reuse an OpenRouter model slug? No. Select an exact KeepRouter model ID.
Why set useResponsesApi to false? Continue can prefer Responses for some model families. Set false when you are configuring and testing the Chat Completions route.
Does capabilities: [tool_use] make tools work? It tells Continue to add the capability; it cannot add support to a model or gateway route. Run a real tool round trip.