Skip to content

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

  1. Generate an API key in Developers and export it as HEYELY_API_KEY.
  2. Add the HeyEly provider block to your global config at ~/.config/kilo/kilo.jsonc (on Windows, 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 }
        }
      }
    }
  }
}
  1. 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

  1. Run kilo models heyely and confirm your configured model appears.
  2. Run kilo roll-call "^heyely/" to send a lightweight probe and display model latency.
  3. Run kilo run -m heyely/claude-sonnet-5.5 "Reply with exactly: gateway-ok".
  4. 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.context to trigger automatic compaction; without it, conversations never compact. Always define both context and output.
  • limit.output maps directly to max_tokens, defaulting to a 32,000 cap in Kilo.
  • Setting tool_call: true unlocks file editing and terminal tool execution.
  • Need a model served through POST /v1/responses? Switch npm to @ai-sdk/openai while keeping the same baseURL.

Troubleshooting

You seeCauseFix
401 invalid_api_key{env:HEYELY_API_KEY} was put in a project config or not exportedMove the provider into your global config and export HEYELY_API_KEY
Model missing from listInvalid JSONC syntax or model alias mismatchCheck syntax and ensure model uses heyely/ plus your models key
Agent cannot modify filestool_call is disabledAdd "tool_call": true
Context never compactslimit.context omittedDefine limit.context on the model
404 model_not_foundid does not match HeyEly's catalogCopy the exact ID from the Models page
402 insufficient_creditNo credit available on the accountAdd credit
402 free_credit_not_eligibleAccount holds only free credit and this model or request does not qualifyChoose an eligible open-weight text model, lower max_tokens, or add credit
402 key_limit_reachedThis API key hit its dollar capRaise the limit in Developers or swap keys