IDE extensionsAnthropic + OpenAI compatible

How to use Kilo Code with a custom OpenAI-compatible or Anthropic endpoint

Add a Custom provider in Kilo Code's Providers tab with OpenAI Compatible or Anthropic Messages and Base URL https://www.ccsub.net/api/v1, plus kilo.json tips.

Last updated:Kilo Code 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.

Provider API
OpenAI Compatible(or Anthropic Messages)
Base URL
https://www.ccsub.net/api/v1(include /v1 for either API)
API key
sk-your-ccsub-key
Model ID
claude-sonnet-5

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 Kilo Code and create a CCSub key

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

  2. 2

    Open the Custom provider dialog

    Open Kilo Code settings (gear icon) → Providers tab, scroll to the bottom and click Custom provider.

  3. 3

    Fill in the provider

    Set Provider ID to ccsub, Display name to CCSub, Provider API to OpenAI Compatible (or Anthropic Messages), Base URL to https://www.ccsub.net/api/v1, and paste your key into API key.

  4. 4

    Add models

    With OpenAI Compatible, click Fetch models; with Anthropic Messages, click Add model and type the ID, e.g. claude-sonnet-5. Then click Submit.

  5. 5

    Pick the model and verify

    Choose a model under ccsub in the model picker, run a task and check the request on the Usage page of the CCSub dashboard.

Kilo Code is an open-source coding agent for VS Code. The 2026 extension was rebuilt on top of OpenCode, and its configuration works differently from the legacy extension and from Roo Code: instead of one API Provider dropdown, you add a "Custom provider" on the Providers tab, and the result is stored in kilo.json. This guide follows the extension as of October 2026.

Add a Custom provider in the UI

Open Kilo Code settings (gear icon) → Providers tab, scroll to the bottom and click Custom provider:

Custom provider dialog
Provider ID
ccsubLowercase letters, numbers, hyphens or underscores.
Display name
CCSub
Provider API
OpenAI CompatibleAnthropic Messages also works.
Base URL
https://www.ccsub.net/api/v1Include /v1 for either Provider API.
API key
sk-your-ccsub-keyMarked optional in the dialog, but required for CCSub.
Models
claude-sonnet-5Fetch models, or Add model by hand.

Click Submit. The models then appear under ccsub in the model picker. The model field takes IDs such as claude-sonnet-5; every available ID is on the models page.

Which Provider API to choose

  • OpenAI Compatible calls /chat/completions and supports Fetch models, which reads https://www.ccsub.net/api/v1/models. This is the least typing.
  • Anthropic Messages calls /messages. Fetch models is disabled, so add each model ID with Add model.
  • OpenAI Responses is also available, and CCSub serves /responses, but the first two cover most needs.

Anthropic Messages needs /v1 in the URL too. The rebuilt Kilo Code uses the AI SDK, which appends only /messages to the Base URL and adds /v1 by itself only for the official Anthropic host. So unlike Claude Code, the bare https://www.ccsub.net does not work here — use https://www.ccsub.net/api/v1. This catches people migrating from Roo Code, where the Anthropic URL had no /v1.

Managing it in kilo.json

The dialog cannot set token limits, and models without them default to 0, which gets in the way of context management. Edit the config file to add them:

Kilo config locations
Global
~/.config/kilo/kilo.jsonkilo.jsonc and opencode.json are read too.
Project
./kilo.json or ./.kilo/kilo.json

Example using Anthropic Messages (adjust the limit values to your needs):

{
  "provider": {
    "ccsub": {
      "npm": "@ai-sdk/anthropic",
      "name": "CCSub",
      "options": {
        "baseURL": "https://www.ccsub.net/api/v1",
        "apiKey": "{env:CCSUB_API_KEY}"
      },
      "models": {
        "claude-sonnet-5": {
          "name": "claude-sonnet-5",
          "limit": { "context": 200000, "output": 32000 }
        }
      }
    }
  },
  "model": "ccsub/claude-sonnet-5"
}

{env:CCSUB_API_KEY} reads the key from an environment variable, but only in the global config — in a project kilo.json it is left as literal text. Models are referenced as providerID/modelID.

Verify

Pick a model under ccsub, give Kilo Code a small task, and look for the request on the Usage page of your CCSub dashboard. Kilo's config format is essentially OpenCode's, so the OpenCode guide explains the remaining fields. If you prefer a classic dropdown-style setup, see the Cline guide.

Common errors and fixes

404 with Anthropic Messages

Cause:Base URL is the bare https://www.ccsub.net, so requests go to /messages.

Fix:Change it to https://www.ccsub.net/api/v1.

The model's context limit is 0

Cause:Models added in the dialog have no token limits, which default to 0.

Fix:Add limit.context and limit.output for that model in kilo.json.

401 because {env:CCSUB_API_KEY} was not substituted

Cause:Environment variable references only work in the global ~/.config/kilo/kilo.json, not in a project kilo.json.

Fix:Move the provider block with {env:...} to the global file, or paste the key in the dialog.

401 authentication_error: Missing or invalid API key

Cause:The API key field was left empty (the dialog marks it optional) or the key was mistyped.

Fix:Edit the ccsub provider and paste your CCSub key again.

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

Why does the Base URL need /v1?

The rebuilt Kilo Code uses OpenCode and the AI SDK. Anthropic Messages only appends /messages and OpenAI Compatible only appends /chat/completions; neither adds /v1 for third-party hosts. Use https://www.ccsub.net/api/v1 for both.

Can I change the URL of the built-in Anthropic provider?

Not in the UI — the built-in Anthropic provider only asks for a key. You can set provider.anthropic.options.baseURL in the config file, but adding a Custom provider as shown here is simpler.

Why is Fetch models greyed out?

Model fetching is not available for Anthropic Messages. Use Add model and type the model ID, or switch the Provider API to OpenAI Compatible.

I am moving from Roo Code. Anything to watch for?

The Roo Code team announced in April 2026 that the project was shutting down and archived the repository; Kilo publishes a migration guide. When you re-add CCSub, note that Roo Code's Anthropic URL had no /v1, while Kilo's Anthropic Messages URL must include it.

What model IDs can I use?

IDs such as claude-sonnet-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.