Kilo Code
Wire Kilo Code across CLI, VS Code, and JetBrains to HeyEly via one global config file.
Kilo Code shares a single configuration file across its CLI, VS Code extension, and JetBrains plugin. Define HeyEly once as a custom OpenAI-compatible provider targeting Chat Completions at https://heyely.si/v1.
Set up
- Generate an API key in Developers and export it as
HEYELY_API_KEY. - Add the HeyEly provider block to your global config at
~/(on Windows,. config/ kilo/ kilo. jsonc C:\).Users\ <you>\ . config\ kilo\ kilo. jsonc
{
"$schema": "https://app.kilo.ai/config.json",
"model": "heyely/claude-sonnet-5.5",
"provider": {
"heyely": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://heyely.si/v1",
"apiKey": "{env:HEYELY_API_KEY}"
},
"models": {
"claude-sonnet-5.5": {
"id": "anthropic/claude-sonnet-5.5",
"name": "Claude Sonnet 5.5",
"tool_call": true,
"limit": { "context": 1000000, "output": 32000 }
}
}
}
}
}
- Restart Kilo Code to load the changes.
Note that {env:HEYELY_API_KEY} only resolves inside your global config; Kilo ignores env interpolation inside repository-level configs. Always keep keys out of project files.
Each property name inside models is the short local alias Kilo displays and accepts in model and -m (keep it slash-free), whereas id is the exact HeyEly catalog ID sent over the wire.
Prefer configuring inside VS Code? Open Settings, select Providers, scroll down to Custom provider, pick OpenAI Compatible under Provider API, and enter the base URL and key. Explicit token limits and tool-calling flags still need to live in the config file.
Verify
- Run
kilo models heyelyand confirm your configured model appears. - Run
kiloto send a lightweight probe and display model latency.roll-call "^heyely/ " - Run
kilo.run -m heyely/ claude-sonnet-5. 5 "Reply with exactly: gateway-ok" - Open Credit and usage to see the test call at the top of Spend under your chosen model.
Pick a model
- Kilo relies on
limit.contextto trigger automatic compaction; without it, conversations never compact. Always define bothcontextandoutput. limit.outputmaps directly tomax_tokens, defaulting to a 32,000 cap in Kilo.- Setting
tool_call: trueunlocks file editing and terminal tool execution. - Need a model served through
POST /v1/responses? Switchnpmto@ai-sdk/openaiwhile keeping the samebaseURL.
Troubleshooting
| You see | Cause | Fix |
|---|---|---|
401 invalid_api_key | {env:HEYELY_API_KEY} was put in a project config or not exported | Move the provider into your global config and export HEYELY_API_KEY |
| Model missing from list | Invalid JSONC syntax or model alias mismatch | Check syntax and ensure model uses heyely/ plus your models key |
| Agent cannot modify files | tool_call is disabled | Add "tool_call": true |
| Context never compacts | limit.context omitted | Define limit.context on the model |
404 model_not_found | id does not match HeyEly's catalog | Copy the exact ID from the Models page |
402 insufficient_credit | No credit available on the account | Add credit |
402 | Account holds only free credit and this model or request does not qualify | Choose an eligible open-weight text model, lower max_tokens, or add credit |
402 key_limit_reached | This API key hit its dollar cap | Raise the limit in Developers or swap keys |