# Kilo Code

<img
  src="/brand/banner-a-03.webp"
  alt=""
  loading="lazy"
  width="1280"
  height="549"
  className="brand-band"
/>

[Kilo Code](https://kilo.ai/docs) is an open-source coding agent that ships as
a VS Code extension, a JetBrains plugin and a CLI. All three read the same
config, so set it up once.

```bash
code --install-extension kilocode.kilo-code   # VS Code
npm install -g @kilocode/cli                  # CLI
```

The JetBrains plugin is on the
[marketplace](https://plugins.jetbrains.com/plugin/28350-kilo-code).

*Setup guide: this config comes from Kilo Code's official documentation and
has not been run end to end against the gateway. Corrections to [support@hyphen-solution.com](mailto:support@hyphen-solution.com).*

## 1. Get a key

[app.hyphen-solution.com](https://app.hyphen-solution.com) → sign in → pick a
plan or credit pack → **Dashboard → API Keys**. Copy the `sk-...` key.

## 2. Configure with `kilo.jsonc`

Kilo Code is backed by a `kilo.jsonc` file, and the GUI writes to the same
place. Project scope is `./kilo.jsonc` or `./.kilo/kilo.jsonc`, global scope is
`~/.config/kilo/kilo.jsonc`. Project wins.

```json
{
  "$schema": "https://app.kilo.ai/config.json",
  "model": "hyphen/minimax-m3",
  "provider": {
    "hyphen": {
      "options": {
        "apiKey": "{env:HYPHEN_API_KEY}",
        "baseURL": "https://api.hyphen-solution.com/v1"
      },
      "models": {
        "minimax-m3": {
          "name": "MiniMax M3",
          "tool_call": true,
          "limit": { "context": 200000, "output": 32000 }
        },
        "minimax-m2.7": {
          "name": "MiniMax M2.7",
          "tool_call": true,
          "limit": { "context": 200000, "output": 32000 }
        },
        "minimax-m2.5": {
          "name": "MiniMax M2.5",
          "tool_call": true,
          "limit": { "context": 200000, "output": 32000 }
        }
      }
    }
  }
}
```

Then export the key so `{env:...}` resolves:

```bash
export HYPHEN_API_KEY="sk-YOUR_KEY"
```

The `model` field is `provider_id/model_id`, so `hyphen/minimax-m3` means the
`minimax-m3` entry under the `hyphen` provider defined below it. The provider
ID is yours to choose.

`tool_call: true` is required or the agent cannot edit files. Keep `output`
generous. The M-series reason before emitting a tool call, and a tight cap gets
spent on thinking, so the agent returns nothing and looks broken.

## 3. Or configure in the GUI

VS Code and JetBrains: settings (gear) → **Providers** → **Custom provider**:

- **Provider ID:** `hyphen`
- **Display name:** `Hyphen`
- **Provider API:** **OpenAI Compatible**
- **Base URL:** `https://api.hyphen-solution.com/v1`
- **API key:** `sk-YOUR_KEY`
- **Models:** Kilo Code auto-fetches these from `GET /v1/models`, so the
  catalog should populate itself. Add them by hand if it does not.

Context limits, output limits and the tool-calling flag are not exposed in the
GUI. Kilo Code's own docs tell you to edit `kilo.jsonc` directly for those,
which is the block above.

## 4. Verify

**VS Code / JetBrains:** open the Kilo Code panel, pick `minimax-m3` in the
model selector, and ask it to reply with a single word.

**CLI:**

```bash
kilo run --model hyphen/minimax-m3 "Reply with the single word: connected"
```

## The Anthropic option

Kilo Code also offers **Anthropic Messages** as a Provider API. Hyphen serves
that surface at `/v1/messages`. If you pick it, set the Base URL
to `https://api.hyphen-solution.com` with **no `/v1`**. The OpenAI Compatible
option is the simpler default and the one this page uses.

## Troubleshooting

- **Model not found**. The `model` field must be `provider_id/model_id`, not
  a bare model name.
- **`401`**. `HYPHEN_API_KEY` was not exported in the shell that launched the
  editor, so `{env:HYPHEN_API_KEY}` resolved to nothing.
- **404**. Base URL is missing `/v1`.
- **Agent will not edit files**. `tool_call` is not `true` on the model entry.
- **Empty replies**. Raise the `output` limit. See
  [Choosing a model](/choosing-a-model#the-max_tokens-gotcha).
- **`429`**. Monthly budget spent. See [Rate limits & caps](/rate-limits).
- **Docs moved.** `kilocode.ai` now redirects to `kilo.ai`. Current reference:
  [OpenAI-compatible providers](https://kilo.ai/docs/ai-providers/openai-compatible).

## Related

- [Choosing a model](/choosing-a-model): which model for which job.
- [Other OpenAI-compatible clients](/agents/other-clients): Roo Code, opencode, Cursor, Cline.
