Continue with an OpenAI-compatible endpoint
Continue lives inside VS Code and JetBrains and runs autocomplete, chat, inline edits and apply. Every one of those is a separate role in one config file, and each role can point at a different model on a different endpoint. This page shows the config, explains why autocomplete and chat want opposite kinds of model, and what each role actually costs at realistic request volumes.
One config file, one entry per model
Continue reads ~/.continue/config.yaml. Older installs may have a config.json, which uses the same fields in a different shape — if you find one, the values below map across directly.
The load-bearing pair is provider: openai and apiBase. The provider tells Continue which request format to build; the apiBase tells it where to send the result. Setting one without the other is the most common reason a new entry silently does nothing.
# ~/.continue/config.yaml
name: My Config
version: 0.0.1
schema: v1
models:
# Autocomplete: hundreds of tiny requests a day. It wants a small,
# fast model that streams — not your strongest one.
- name: Fast autocomplete
provider: openai
model: deepseek-v4-flash
apiBase: https://aicomp.ai/v1
roles:
- autocomplete
# Chat, edit and apply: fewer requests, much larger ones.
- name: Strong chat
provider: openai
model: claude-sonnet-5
apiBase: https://aicomp.ai/v1
roles:
- chat
- edit
- apply
capabilities:
- tool_use
Note that both entries use the same base URL. That is the point of an OpenAI-compatible endpoint: switching models is one line in a list, not a new provider integration or a new billing relationship.
Roles decide which model pays for which work
Continue does not send every request to one model. The roles list assigns each feature — autocomplete, chat, edit, apply, summarize, embed, rerank — to a specific entry. This is the most under-used cost control in the whole tool.
Autocomplete is the extreme case. It fires constantly, each request is tiny, and anything slower than about half a second is worse than no suggestion at all. Giving it a frontier model means paying top rates for a job where latency matters more than reasoning. Chat and edit are the opposite: fewer requests, much larger ones, where quality actually shows up in the result.
| Model | Vendor | Rate in / out per 1M | Per completion | Per month |
|---|---|---|---|---|
| gpt-5.6-luna | OpenAI | $0.1 / $0.6 | $0.00027 | $2 |
| MiniMax-M3 | MiniMax | $0.15 / $0.6 | $0.00037 | $3 |
| deepseek-v4-flash | DeepSeek | $0.22 / $0.66 | $0.00052 | $4 |
| gemini-3.7-flash | $0.375 / $1.875 | $0.00097 | $8 | |
| claude-haiku-4-5-20251001 | Anthropic | $0.5 / $2.5 | $0.00130 | $10 |
| deepseek-v4-pro | DeepSeek | $0.66 / $1.98 | $0.00156 | $12 |
| glm-5.3 | Zhipu | $0.7 / $2.2 | $0.00166 | $13 |
| qwen3.8-max | Alibaba | $1 / $3 | $0.00236 | $19 |
| claude-sonnet-5 | Anthropic | $1 / $5 | $0.00260 | $21 |
| gpt-5.6-terra | OpenAI | $1 / $6 | $0.00272 | $22 |
| kimi-k3 | Moonshot | $1.5 / $7.5 | $0.00390 | $31 |
| claude-opus-5 | Anthropic | $2.5 / $12.5 | $0.00650 | $52 |
Verify the endpoint before debugging the config
When a new entry does not appear in the model picker, the instinct is to keep editing YAML. Check the endpoint first — it takes one request, and it separates a config problem from a credentials problem.
# Confirm the endpoint and model ID before blaming the config.
curl "$GATEWAY_BASE_URL/chat/completions" \
-H "Authorization: Bearer $GATEWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"ok"}],"max_tokens":5}'
# If this returns JSON, the same values will work in config.yaml.
If that returns JSON, the base URL, key and model ID are all fine, and any remaining problem is in the config. If it does not, no amount of YAML editing will help. Continue also reports parse errors in a banner at the top of its panel, which is worth reading before assuming the file loaded.
How this fails in practice
| What you see | What it usually is | Fix |
|---|---|---|
| Model missing from the picker | YAML parse error, or Continue not reloaded after saving | Look for the error banner at the top of the Continue panel; reload the window |
| Requests still go to OpenAI | apiBase set but provider left as something else | Both are required: provider: openai selects the format, apiBase selects the destination |
| 401 on every request | Key not read; editor launched from Dock or Spotlight never inherited the shell variable | Use the secrets placeholder, or launch the editor from a terminal that exported the variable |
| Autocomplete feels slow | A large model assigned to the autocomplete role | Put a small streaming model on autocomplete and keep the strong one for chat and edit |
| 404 from the endpoint | apiBase missing /v1 | Continue appends the path itself; the base URL ends in /v1 |
| Model listed but errors on use | ID not returned by /v1/models, or the route does not support tool calling | Check /v1/models and only add tool_use to capabilities if the route supports it |
https://aicomp.ai/v1).
Create one free →
FAQ
Where does Continue store its config?
In ~/.continue/config.yaml. You can open it from the Continue panel's gear icon, or edit the file directly. Older installations may have config.json instead, which carries the same fields.
Do I need one entry per model?
Yes — one entry per model, each with its own roles. That is what lets autocomplete use a small fast model while chat uses a stronger one, which is the main cost control available here.
Why is provider still openai when I am not using OpenAI?
The provider field names a wire format, not a vendor. provider: openai means 'build OpenAI-shaped requests', and apiBase decides where they go.
Can I keep the API key out of the config file?
Yes. Use the secrets placeholder and set the value in Continue Hub secrets, or export it in the shell that launched the editor — an editor started from the Dock does not inherit shell variables.
What should I assign to autocomplete?
A small model with low latency that streams. Autocomplete is judged on speed more than depth, and it fires often enough that the rate matters more than in any other role.
Does tool calling work through a custom endpoint?
Only if the route supports it. Add tool_use to capabilities when the endpoint confirms tool calling on that model; otherwise leave it off rather than discovering it at request time.