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: false

For 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

SurfaceDefault local pathReload
Continue IDE extension on macOS or Linux~/.continue/config.yamlSave the file or use Reload config in the config selector
Continue IDE extension on Windows%USERPROFILE%\.continue\config.yamlSave the file or use Reload config
Continue CLI~/.continue/config.yamlStart 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

FieldPurposeKeepRouter rule
provider: openaiUses Continue's OpenAI-compatible clientKeep this for the public chat-compatible route
apiBaseAPI rootUse https://keeprouter.com/v1, not the complete chat URL
apiKeyAuthenticationReference a scoped secret
modelExact catalog IDCopy from the live KeepRouter model page, not another service
rolesContinue features that can select the modelStart with chat; add edit/apply or autocomplete only after a role-specific test
capabilitiesAdds capability hintsOmit it initially; add tool_use only after the model and route pass a real tool round trip
useResponsesApiSelects Responses instead of Chat Completions for some model familiesSet 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 concernKeepRouter change
OpenRouter provider or API baseUse provider: openai and https://keeprouter.com/v1
OPENROUTER_API_KEYReplace with a scoped KeepRouter secret
OpenRouter model slugMap to an exact KeepRouter catalog ID
Provider routing, ZDR, fallback, variantsRemove; KeepRouter does not expose equivalent self-serve request fields
OpenRouter attribution headersRemove unless the target contract documents them
Roles and tool capabilityRe-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

  1. Reload the Continue config and confirm the named model appears once.
  2. Send a deterministic chat prompt and verify the request in KeepRouter usage.
  3. Run one edit on a disposable file and review the proposed diff.
  4. Run one harmless tool call. Agent mode needs complete tool-call and tool-result behavior, not only a capability label.
  5. Cancel one streaming response and confirm the client stops cleanly.
  6. Record HTTP errors, selected model, usage, and charge before expanding roles.

Troubleshooting

SymptomCheck
Config does not loadYAML indentation, required name/version/schema, and the current config path
Secret is emptyContinue secret name matches KEEPROUTER_API_KEY and was stored in the active config context
401Key scope, revocation, whitespace, and destination host
404apiBase is exactly https://keeprouter.com/v1, without /chat/completions
Model not foundExact current KeepRouter model ID and a supported chat endpoint
Continue calls Responses unexpectedlySet useResponsesApi: false for a Chat Completions route
Agent mode unavailableModel supports tool calls, capability is detected or added, and Continue has reloaded the config
Tool call begins but cannot finishTool result and message history are preserved, route supports the schema, and the exact model passes the round trip
Autocomplete feels slow or expensiveUse 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.

Sources reviewed 2026-08-26