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).
- Console: https://aicentos.com
- Create a key: https://aicentos.com/keys
- Wallet top-up: https://aicentos.com/wallet
Also confirm Kilo CLI is installed globally:
npm install -g @kilocode/cliConfiguration to fill in
| Field | Value |
|---|---|
Provider package (npm) | @ai-sdk/openai-compatible |
options.baseURL | https://aicentos.com/v1 |
options.apiKey | The 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.output | Fill in according to the chosen model |
Setup steps
- Create or edit the global configuration file:
~/.config/kilo/kilo.json(orkilo.jsonc); ifXDG_CONFIG_HOMEis set, that directory takes precedence.- A project-level
./kilo.jsoncoverrides 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
kiloin the project directory, or switch models with/modelin 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.baseURLshould only go up tohttps://aicentos.com/v1; do not extend it to the full/v1/chat/completionspath.- The
{env:VAR}environment variable substitution syntax only works in the global configuration file; for security reasons, a project-levelkilo.jsoncdoes not resolve{env:...}. - Custom models must declare
limit.contextandlimit.outputexplicitly; otherwise the context length is treated as 0 and auto-compaction stops working. - If the gateway does not provide a
/v1/modelslisting endpoint, automatic model discovery fails — declare the models manually as shown above. - See the docs site for more details: https://docs.aicentos.com