CanalAPI
Community tools

Connect Kilo Code

Set up CanalAPI in the Kilo Code editor extension or CLI and verify models and tool use.

Kilo Code offers editor extensions and a CLI coding agent. Configure the client you actually use; the CLI config path is not the settings location for every extension version.

Checked 2026-11-03 against stable v7.8.18. The newer observed v7.8.25 is a prerelease. Official configuration and the form were checked; real CanalAPI inference remains untested.

1. Editor configuration

Install your client through the official documentation. In VS Code, open Settings → Providers → Custom provider:

FieldValue
Provider IDcanalapi
Display nameCanalAPI
Provider APIOpenAI Compatible (Chat Completions)
Base URLhttps://api.canalapi.com/v1
API keyYour CanalAPI key
ModelsSelect or enter a full model ID

Official Kilo Code custom-provider form with no key

Official v7.8.18 screenshot, retaining upstream example values. Use the CanalAPI values above instead. It contains no real key and does not demonstrate a successful connection.

Click Submit, then select the provider's model in the model picker. Discovery only reads the catalog: CanalAPI's public model list does not validate credentials. Enter the full ID manually if discovery fails.

2. CLI configuration

Back up and merge this into ~/.config/kilo/kilo.json or the selected project's kilo.json, preserving existing fields. Do not store a real key in a project file.

{
  "provider": {
    "canalapi": {
      "npm": "@ai-sdk/openai-compatible",
      "env": [
        "CANALAPI_API_KEY"
      ],
      "options": {
        "baseURL": "https://api.canalapi.com/v1"
      },
      "models": {
        "YOUR_MODEL_ID": {
          "name": "CanalAPI model",
          "limit": {
            "context": 128000,
            "output": 8192
          }
        }
      }
    }
  },
  "model": "canalapi/YOUR_MODEL_ID"
}

Replace both YOUR_MODEL_ID values. 128000 / 8192 are illustrative context/output limits: use the model's real limits before running. Upstream documents a default of 0 when these fields are omitted, affecting context management.

In the PowerShell window that will start Kilo:

$env:CANALAPI_API_KEY = "YOUR_CANALAPI_KEY"

For macOS / Linux:

export CANALAPI_API_KEY='YOUR_CANALAPI_KEY'

Replace the key placeholder before starting the CLI. env selects the credential variable; the JSON contains no actual key. These variables apply to the current process and its children, not an independently started GUI.

3. Verify and diagnose

Ask “Reply only OK; do not call tools”, check usage logs, then summarize a fictional README in a test project. Review approvals before permitting edits or commands.

  • Wrong model: check the session, default model and actual client config. canalapi/ is a client-side prefix.
  • 400 / tool failure: verify Chat Completions and tool support. Do not mix Responses or Anthropic settings merely because of a model's brand.
  • 404: use the shown /v1 base URL without duplicated paths.
  • Undo: select the previous provider, remove only the added entry or restore the backup, and revoke the unused dedicated key.

Sources: OpenAI-compatible setup, versioned guide. See troubleshooting.

On this page