> ## Documentation Index
> Fetch the complete documentation index at: https://docs.auriko.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Kilo Code

> Use Auriko as your LLM provider in Kilo Code

Auriko connects to Kilo Code as a provider, giving you access to multiple models through a single API key.

## Prerequisites

* [Kilo Code](https://kilocode.ai) VS Code extension or CLI
* An [Auriko API key](https://auriko.ai/signup?redirectTo=%2Fdashboard%3Ftab%3Dapi-keys) — your key starts with `ak_live_` (production) or `ak_test_` (testing)

## Install Kilo Code

Open Extensions in VS Code (`Cmd+Shift+X` on macOS, `Ctrl+Shift+X` on Windows/Linux), search "Kilo Code", and install.

<Accordion title="Install the CLI">
  Install via npm:

  ```bash theme={null}
  npm install -g @kilocode/cli
  ```

  Or via Homebrew (macOS):

  ```bash theme={null}
  brew install Kilo-Org/tap/kilo
  ```

  Confirm the installation:

  ```bash theme={null}
  kilo --version
  ```
</Accordion>

## Set your API key

Export your API key in your shell:

```bash theme={null}
export AURIKO_API_KEY="ak_live_..."
```

To persist across sessions, add the same line to `~/.zshrc` or `~/.bashrc`, then either run `source ~/.zshrc` (or `source ~/.bashrc`) or open a new terminal.

<Tip>
  **Non-interactive shells (CI, Codespaces `bash -c`, scripts) don't source `~/.bashrc`.** For those, export `AURIKO_API_KEY` directly in the environment or source the file explicitly at the top of your script.
</Tip>

### Sanity-check the key

Confirm the key works before installing anything else:

```bash theme={null}
curl -s -o /dev/null -w "%{http_code}\n" \
  -H "Authorization: Bearer $AURIKO_API_KEY" \
  https://api.auriko.ai/v1/me
```

Expected: `200`. If you get `401`, the key is missing, mistyped, or revoked.

## Add Auriko as a provider

### VS Code

1. Open Kilo Code settings (gear icon in the Kilo Code panel).
2. Go to the **Providers** tab.
3. Click **Custom provider**.
4. Fill in:
   * **Provider ID:** `auriko`
   * **Display name:** `Auriko`
   * **Base URL:** `https://api.auriko.ai/v1`
   * **API key:** your `ak_live_...` key
5. Models auto-populate. Select a model.
6. Click **Submit**.

### CLI

No registration step is needed — `kilo run` resolves any `auriko/<model>` ID from your API key. Skip to **Verify**.

<Accordion title="If auriko/* models aren't found (CLI fallback)">
  If `kilo run --model auriko/<id>` returns "model not found" (rare; usually means Kilo's registry cache didn't refresh), define the provider locally in a `kilo.json` at your project root:

  ```json theme={null}
  {
    "$schema": "https://app.kilo.ai/config.json",
    "model": "auriko/claude-sonnet-4-6",
    "provider": {
      "auriko": {
        "env": ["AURIKO_API_KEY"],
        "models": {
          "claude-sonnet-4-6": {
            "name": "Claude Sonnet 4.6",
            "reasoning": true,
            "tool_call": true,
            "limit": { "context": 200000, "output": 16384 }
          }
        },
        "options": {
          "baseURL": "https://api.auriko.ai/v1"
        }
      }
    }
  }
  ```

  This overrides Kilo's provider registry with a local definition.
</Accordion>

## Verify

**VS Code:** Start a chat in the Kilo Code panel and send a message. You should see a response from the model you selected.

**CLI:**

```bash theme={null}
kilo run "Say exactly: setup-ok" --model auriko/claude-sonnet-4-6
```

Expected output: `setup-ok`.

<Note>
  **First run only:** Kilo performs a one-time SQLite migration (`Performing one time database migration, may take a few minutes...`). The first call can take up to a minute. Subsequent calls return in seconds.
</Note>

## Set default model

To avoid passing `--model` on every run, create a `kilo.json` at your project root:

```json theme={null}
{
  "$schema": "https://app.kilo.ai/config.json",
  "model": "auriko/claude-sonnet-4-6"
}
```

Place it at `~/.config/kilo/kilo.json` for a global default instead. A project-root config takes precedence.

VS Code users set their default model in the model picker (top of the Kilo Code panel).

<Caution>
  **Migrating from opencode?** Kilo Code is an opencode fork and reads `./opencode.json` in addition to `./kilo.json`. If both files exist and define `model`, the opencode.json value wins silently. Either delete `opencode.json` or keep its `model` field in sync.
</Caution>

## Use different models

Pass any registered model with the `--model` flag:

```bash theme={null}
kilo run "Summarize this repo" --model auriko/deepseek-v4-flash
kilo run "Review my code" --model auriko/gemini-2.5-pro
```

VS Code: switch models in the model picker.

These models are available through Auriko:

| Model                    | Author    | Context |
| ------------------------ | --------- | ------- |
| `claude-sonnet-4-6`      | Anthropic | 1M      |
| `claude-opus-4-6`        | Anthropic | 1M      |
| `claude-opus-4-7`        | Anthropic | 1M      |
| `deepseek-v4-flash`      | DeepSeek  | 1M      |
| `deepseek-v4-pro`        | DeepSeek  | 1M      |
| `gemini-2.5-flash`       | Google    | 1M      |
| `gemini-2.5-pro`         | Google    | 1M      |
| `gemini-3.1-pro-preview` | Google    | 1M      |
| `glm-5.1`                | Z.AI      | 200K    |
| `grok-4.3`               | xAI       | 1M      |
| `kimi-k2.5`              | Moonshot  | 262K    |
| `kimi-k2.6`              | Moonshot  | 262K    |
| `minimax-m2-7`           | MiniMax   | 205K    |
| `minimax-m2-7-highspeed` | MiniMax   | 205K    |
| `qwen-3.6-plus`          | Alibaba   | 1M      |

### Known model quirks on Kilo

* **`gemini-2.5-flash` on tool-call prompts:** returns an empty response (no tool invocation, no text). Use `gemini-2.5-pro` or `gemini-3.1-pro-preview` for tool-calling workflows on the Gemini family.
* **`gemini-2.5-pro` on arithmetic:** can produce wrong answers when asked for an exact number without showing work. Prompt it to use a tool or show its reasoning for math-critical tasks.

To list every model available on your key (not only the 15 above):

```bash theme={null}
curl -s -H "Authorization: Bearer $AURIKO_API_KEY" \
  https://api.auriko.ai/v1/models | jq '.data[].id'
```

## Add unregistered models (advanced)

If you need a model that isn't in the 15 above and `auriko/<id>` doesn't resolve, define it locally in `kilo.json`:

```json theme={null}
{
  "$schema": "https://app.kilo.ai/config.json",
  "model": "auriko/deepseek-v3.2",
  "provider": {
    "auriko": {
      "env": ["AURIKO_API_KEY"],
      "models": {
        "deepseek-v3.2": {
          "name": "DeepSeek V3.2",
          "reasoning": true,
          "tool_call": true,
          "limit": { "context": 163840, "output": 8192 }
        }
      },
      "options": {
        "baseURL": "https://api.auriko.ai/v1"
      }
    }
  }
}
```

Browse model capabilities via the [directory API](https://api.auriko.ai/v1/directory/models) to fill in the model definition fields.

VS Code custom provider auto-fetches all models from the API, so this section applies to CLI users only.

## Control routing

Configure routing in the [Auriko dashboard](https://auriko.ai/dashboard). See [routing options](/guides/routing-options) for details.

## Uninstall

**VS Code:** Remove the Auriko custom provider from Settings > Providers. Uninstall the Kilo Code extension.

**CLI:** Remove `AURIKO_API_KEY` from your shell profile (`~/.zshrc` or `~/.bashrc`). If you created a `kilo.json`, remove the auriko-related lines or delete the file.

## Troubleshoot

| Symptom                                                                   | Cause                                                                                                                                              | Fix                                                                                                                                      |
| ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `Error: API key is invalid.` or `Error: Model not found: auriko/<model>.` | `AURIKO_API_KEY` missing in this shell, or revoked                                                                                                 | Run `echo $AURIKO_API_KEY`. If empty, export it. If set, verify at `https://api.auriko.ai/v1/me` (expect HTTP 200)                       |
| No models in custom provider dialog (VS Code)                             | Base URL wrong or API unreachable                                                                                                                  | Use exactly `https://api.auriko.ai/v1`. Enter the API key first — auto-detection requires both                                           |
| Model not found (404)                                                     | Wrong model ID format                                                                                                                              | VS Code: bare IDs (`claude-sonnet-4-6`). CLI: `auriko/` prefix (`auriko/claude-sonnet-4-6`)                                              |
| `auriko/*` models not resolved (CLI)                                      | Provider registry cache hasn't refreshed                                                                                                           | Add a provider block to `kilo.json` (see "If auriko/\* models aren't found")                                                             |
| `kilo.json` model field is ignored                                        | Sibling `opencode.json` overrides it (Kilo reads both since it's an opencode fork), or `~/.config/kilo/kilo.json` is loaded after the project file | Check `./kilo.json`, `./opencode.json` (if present), and `~/.config/kilo/kilo.json` — keep them in sync or remove the ones you don't use |
| `Performing one time database migration...` on first run                  | Kilo's one-time SQLite migration                                                                                                                   | Wait — typically completes in under a minute. Only happens on the very first call                                                        |
| `kilo run` returns exit code 0 even when output starts with `Error:`      | Kilo CLI doesn't propagate failures via exit code                                                                                                  | For CI: grep stdout/stderr for `^Error:`, or check for a non-empty `text` event in `--format json` output. Don't rely on `$?`            |
| `gemini-2.5-flash` returns nothing on a tool-using prompt                 | Known Kilo host-side integration quirk                                                                                                             | Use `gemini-2.5-pro` or `gemini-3.1-pro-preview` for tool calls                                                                          |
