IDE extensionsAnthropic + OpenAI compatible

How to use Continue with a custom Anthropic or OpenAI-compatible API

Configure Continue for VS Code or JetBrains with a third-party API in ~/.continue/config.yaml, and why the Anthropic apiBase must include /v1.

Last updated:Continue Official site

Copy-paste configuration

These are the three values the tool needs. Create the API key on the API Keys page of your CCSub dashboard.

apiBase
https://www.ccsub.net/api/v1(include /v1 for provider: anthropic too)
apiKey
sk-your-ccsub-key(use a secret reference)
model
claude-sonnet-5
~/.continue/config.yaml
name: CCSub
version: 1.0.0
schema: v1
models:
  - name: CCSub Claude
    provider: anthropic
    model: claude-sonnet-5
    apiBase: https://www.ccsub.net/api/v1
    apiKey: ${{ secrets.CCSUB_API_KEY }}
    roles: [chat, edit, apply]

For model, use an ID such as claude-sonnet-5 — the full list of model IDs is on the models page. No key yet? Create an account first.

Steps at a glance

  1. 1

    Install Continue and create a CCSub key

    Install Continue from the VS Code or JetBrains marketplace and create an sk- key on the API Keys page of the CCSub dashboard.

  2. 2

    Store the key in .env

    Add the line CCSUB_API_KEY=sk-your-key to ~/.continue/.env.

  3. 3

    Open config.yaml

    Open the Continue sidebar (Cmd/Ctrl+L in VS Code), open the config dropdown above the chat input and click the cog next to Local Config.

  4. 4

    Add a model block

    Under models, add an entry with provider anthropic or openai, the model ID, apiBase https://www.ccsub.net/api/v1 and apiKey ${{ secrets.CCSUB_API_KEY }}.

  5. 5

    Select it and verify

    Pick the model in the chat dropdown, send a message, and check the Usage page in the CCSub dashboard.

Continue is an open-source AI coding extension for VS Code and JetBrains IDEs (IntelliJ IDEA, PyCharm and friends). Models are defined in a YAML file, each with its own provider, apiBase and apiKey, so it can reach CCSub over either the Anthropic or the OpenAI-compatible protocol — and you can define several models side by side.

Where the config lives

Continue now uses config.yaml; its docs state that it replaces the older, deprecated config.json.

Continue config locations
Config file
~/.continue/config.yamlOn Windows: %USERPROFILE%\.continue\config.yaml
Open it from the UI
cog next to Local ConfigIn the config dropdown above the chat input. Open the sidebar with Cmd/Ctrl+L (VS Code) or Cmd/Ctrl+J (JetBrains).
Secrets file
~/.continue/.envUsed by the secrets syntax.

A complete example

First store the key in ~/.continue/.env:

CCSUB_API_KEY=sk-your-key

Then edit ~/.continue/config.yaml:

name: CCSub
version: 1.0.0
schema: v1
models:
  - name: CCSub Claude
    provider: anthropic
    model: claude-sonnet-5
    apiBase: https://www.ccsub.net/api/v1
    apiKey: ${{ secrets.CCSUB_API_KEY }}
    roles: [chat, edit, apply]
  - name: CCSub GPT
    provider: openai
    model: gpt-5.5
    apiBase: https://www.ccsub.net/api/v1
    apiKey: ${{ secrets.CCSUB_API_KEY }}
    roles: [chat, edit, apply]

Save it, and both names appear in the chat model dropdown. The model field takes IDs such as claude-sonnet-5 or gpt-5.5; the full list is on the models page.

What each field does

  • Top-level name, version, schema are all required; schema is always v1. Leaving one out produces a config error.
  • name (per model) is the label shown in the dropdown.
  • provider: anthropic uses the Anthropic protocol (requests messages); openai uses the OpenAI protocol (requests chat/completions).
  • apiBase is https://www.ccsub.net/api/v1 for both providers. Continue adds the trailing slash for you.
  • apiKey: ${{ secrets.CCSUB_API_KEY }} is looked up in .env at the workspace root or .continue/.env, then in ~/.continue/.env.
  • roles says where the model is used: chat, edit, apply, autocomplete, embed, rerank or summarize. The default is chat, edit, apply and summarize.

With provider: anthropic, apiBase must include /v1. Continue resolves messages relative to apiBase, and its built-in default is https://api.anthropic.com/v1/. If you carry over the Claude Code habit of using the bare https://www.ccsub.net, the request goes to https://www.ccsub.net/messages and returns a 404.

Agent mode and autocomplete

  • Agent mode needs a model with tool calling. If Continue does not detect it, add capabilities: [tool_use] to the model block.
  • Autocomplete: Continue's documentation notes that chat models often perform poorly at Tab autocomplete, so the example does not give these models the autocomplete role.

Verify

Select the new model in the Continue chat and send a message. Then open the Usage page in your CCSub dashboard — if the request is listed, you are done. Other agent extensions for VS Code include Cline and Kilo Code; if you are considering a different editor, see the Cursor guide.

Common errors and fixes

404 Not Found with provider: anthropic

Cause:apiBase is the bare domain, so the request goes to https://www.ccsub.net/messages.

Fix:Set apiBase to https://www.ccsub.net/api/v1.

401 authentication_error

Cause:${{ secrets.CCSUB_API_KEY }} resolved to nothing — the .env file is in the wrong place or the name differs.

Fix:Make sure ~/.continue/.env contains CCSUB_API_KEY=sk-... with exactly the name used in config.yaml.

The model never uses tools in Agent mode

Cause:Continue did not detect tool-calling support for that model.

Fix:Add capabilities: [tool_use] to the model block.

Schema or validation error when loading the config

Cause:The required top-level name, version and schema keys are missing.

Fix:Start the file with name, version: 1.0.0 and schema: v1.

For more error messages and what they mean, see the error troubleshooting index. Installation and network issues are covered in the troubleshooting docs (Chinese).

FAQ

Can I still use config.json?

Continue's docs say config.yaml replaces config.json, which is deprecated. Put new configuration in ~/.continue/config.yaml.

Why must apiBase include /v1 for provider: anthropic?

Continue resolves messages relative to apiBase, and its own default is https://api.anthropic.com/v1/. With the bare https://www.ccsub.net the request goes to /messages and fails with a 404, so use https://www.ccsub.net/api/v1.

Can I paste the key straight into config.yaml?

You can, but ${{ secrets.CCSUB_API_KEY }} keeps it out of the file. Continue looks for it in .env at the workspace root or in .continue/.env, then in ~/.continue/.env.

Should I use a CCSub model for autocomplete?

You can give a model the autocomplete role, but Continue's docs note that chat models often perform poorly at autocomplete, so the example leaves that role out.

What model IDs can I use?

IDs such as claude-sonnet-5 or gpt-5.5; the full list is on the CCSub models page.

See all integration guides

Need a CCSub API key?

Sign up, create a key in the dashboard, and paste the values above into your tool. Pay-as-you-go balance does not expire — you only pay for the tokens you use.