Skip to Content
aicentos

Kilo CLI

Connect aicentos in the Kilo command-line tool through a configuration file

Last updated:

Kilo CLI declares providers and models in a JSON / JSONC configuration file and supports pointing @ai-sdk/openai-compatible at any OpenAI-compatible endpoint, so it can connect to aicentos directly.

Prerequisites

First create a dedicated key for the CLI on the console's "API Keys" page (naming it kilo-cli is recommended).

Also confirm Kilo CLI is installed globally:

npm install -g @kilocode/cli

Configuration to fill in

FieldValue
Provider package (npm)@ai-sdk/openai-compatible
options.baseURLhttps://aicentos.com/v1
options.apiKeyThe key created in the console (can be referenced as {env:VAR})
Model reference (top-level model)In provider/model form, e.g. aicentos/gpt-5
limit.context / limit.outputFill in according to the chosen model

Setup steps

  • Create or edit the global configuration file:
    • ~/.config/kilo/kilo.json (or kilo.jsonc); if XDG_CONFIG_HOME is set, that directory takes precedence.
    • A project-level ./kilo.jsonc overrides entries of the same name in the global configuration.
  • Write the following:
{
  "$schema": "https://app.kilo.ai/config.json",
  "model": "aicentos/gpt-5",
  "provider": {
    "aicentos": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "aicentos",
      "options": {
        "baseURL": "https://aicentos.com/v1",
        "apiKey": "{env:AICENTOS_API_KEY}"
      },
      "models": {
        "gpt-5": {
          "name": "GPT-5",
          "limit": { "context": 128000, "output": 16384 }
        }
      }
    }
  }
}
  • Export the environment variable:
export AICENTOS_API_KEY="sk-your-aicentos-key"
  • Run kilo in the project directory, or switch models with /model in the interactive interface.

Test

After starting, try a lightweight test with a simple prompt first, and only start real work once results come back normally.

Notes

  • options.baseURL should only go up to https://aicentos.com/v1; do not extend it to the full /v1/chat/completions path.
  • The {env:VAR} environment variable substitution syntax only works in the global configuration file; for security reasons, a project-level kilo.jsonc does not resolve {env:...}.
  • Custom models must declare limit.context and limit.output explicitly; otherwise the context length is treated as 0 and auto-compaction stops working.
  • If the gateway does not provide a /v1/models listing endpoint, automatic model discovery fails — declare the models manually as shown above.
  • See the docs site for more details: https://docs.aicentos.com