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.

In short: Continue assigns features to models by role in ~/.continue/config.yaml. Autocomplete fires hundreds of tiny requests a day, which inverts the usual ranking: at 2k input and 120 output the input rate decides the bill, not the output rate.

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.

Cost of one autocomplete request at 2k input / 120 output, and of a 20-day month at 400 completions per day. Rates checked 2026-09-20.
ModelVendorRate
in / out per 1M
Per completionPer month
gpt-5.6-lunaOpenAI$0.1 / $0.6$0.00027$2
MiniMax-M3MiniMax$0.15 / $0.6$0.00037$3
deepseek-v4-flashDeepSeek$0.22 / $0.66$0.00052$4
gemini-3.7-flashGoogle$0.375 / $1.875$0.00097$8
claude-haiku-4-5-20251001Anthropic$0.5 / $2.5$0.00130$10
deepseek-v4-proDeepSeek$0.66 / $1.98$0.00156$12
glm-5.3Zhipu$0.7 / $2.2$0.00166$13
qwen3.8-maxAlibaba$1 / $3$0.00236$19
claude-sonnet-5Anthropic$1 / $5$0.00260$21
gpt-5.6-terraOpenAI$1 / $6$0.00272$22
kimi-k3Moonshot$1.5 / $7.5$0.00390$31
claude-opus-5Anthropic$2.5 / $12.5$0.00650$52
Cost note. Autocomplete inverts the usual ranking. At 2k input and 120 output per request, the output rate contributes almost nothing and the input rate decides the bill — the opposite of an agent coding session, where output dominates. A model that ranks badly for chat can be the right choice for autocomplete, which is exactly why roles exist.

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

The failures that account for most setup problems, and what each one actually means.
What you seeWhat it usually isFix
Model missing from the pickerYAML parse error, or Continue not reloaded after savingLook for the error banner at the top of the Continue panel; reload the window
Requests still go to OpenAIapiBase set but provider left as something elseBoth are required: provider: openai selects the format, apiBase selects the destination
401 on every requestKey not read; editor launched from Dock or Spotlight never inherited the shell variableUse the secrets placeholder, or launch the editor from a terminal that exported the variable
Autocomplete feels slowA large model assigned to the autocomplete rolePut a small streaming model on autocomplete and keep the strong one for chat and edit
404 from the endpointapiBase missing /v1Continue appends the path itself; the base URL ends in /v1
Model listed but errors on useID not returned by /v1/models, or the route does not support tool callingCheck /v1/models and only add tool_use to capabilities if the route supports it
You need a key before the code below runs. Create an account, generate a key, and copy the base URL (https://aicomp.ai/v1). Create one free →
Check current rates → Free to sign up · $1 minimum top-up · No prepayment

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.

Related

Get API access