Kilo Code
Connect Kilo Code to Mixen — pay from your balance in roubles, with a catalog of 105+ models.
Installation
Section titled “Installation”- VS Code — open Extensions (
Ctrl+Shift+X/Cmd+Shift+X), search for “Kilo Code” and click Install. - JetBrains — Settings → Plugins → Marketplace tab, search for “Kilo Code” and install it.
Kilo Code also ships as a CLI; all clients read and write the same shared kilo.jsonc config — a provider added in one is available in the others. Details — in the official documentation.
Configuration
Section titled “Configuration”- Kilo Code panel → Settings (gear icon) → Providers tab.
- Scroll the provider list to the bottom and click Custom provider.
- Fill in the dialog:
- Provider ID —
mixen - Display name —
Mixen - Provider API — OpenAI Compatible
- Base URL —
https://api.mixen.ai/v1 - API key — your
mxn-…key - Models — Kilo will fetch the list from
/v1/modelsautomatically: pick models with the (fuzzy) search, or type an ID manually
- Provider ID —
- Click Submit — the selected models appear in the model picker.
If auto-detection doesn’t work, type the model ID manually from the catalog — for example, openai/gpt-5.6-sol.
Key points:
- OpenAI Compatible is the Chat Completions protocol: Kilo will call
/v1/chat/completions. - Fine-grained model options (token limits, tool calling, variants) are edited in the
kilo.jsoncfile. - On JetBrains the plugin uses the same shared
kilo.jsonc— the provider and models from VS Code apply automatically.
Verifying the connection
Section titled “Verifying the connection”Before setting up the provider, you can check the key and balance with a minimal generating request:
curl https://api.mixen.ai/v1/chat/completions \ -H "Authorization: Bearer your-api-key" \ -H "Content-Type: application/json" \ -d '{"model":"z-ai/glm-5.3-flash","messages":[{"role":"user","content":"ping"}],"max_tokens":5}'200 with a response — the key and balance work; 401 invalid api key — the key was copied incompletely or isn’t a Mixen API key; 402 — no funds on the balance.
GET /v1/models does not verify the key — it responds without one; use it only to check that the API is reachable.
Picking a model per task
Section titled “Picking a model per task”Kilo Code keeps a separate model per agent, so the “cheap for planning, strong for editing” pairing is configured once. Prices are per 1M tokens, input/output; full tables with cache columns — in the catalog.
| Task | Model | Input / output |
|---|---|---|
| Reconnaissance: code questions, search, planning | GLM 5.3 Flash (z-ai/glm-5.3-flash) |
8.4 / 27.9 ₽ |
| Edits in familiar code, routine tasks | GLM 5.3 (z-ai/glm-5.3) |
156 / 490.2 ₽ |
| Multi-step agentic tasks, refactoring | GPT-5.6 Sol (openai/gpt-5.6-sol), Claude Sonnet 5 (anthropic/claude-sonnet-5) |
213.9 / 1069.5 ₽ |
GLM 5.3 Flash costs like a “free” model but holds up in the agent protocol — convenient to leave on Ask and Plan while Code runs a flagship.
| Agent | Task | Model |
|---|---|---|
| Plan | planning and architectural decisions | z-ai/glm-5.3-flash |
| Ask | code questions | z-ai/glm-5.3-flash |
| Code | file edits and commands | z-ai/glm-5.3, openai/gpt-5.6-sol |
| Debug | bug diagnostics | openai/gpt-5.6-sol |
| Explore, General | codebase exploration, general tasks | z-ai/glm-5.3-flash |
Saving on sessions
Section titled “Saving on sessions”Kilo agent sessions send the whole accumulated context with every turn — rules, history, read files. Mixen caches the repeating prefix automatically; nothing to enable.
- Repeated context is ~10% of the input price: for GPT-5.6 Sol input is 213.9 ₽ per 1M tokens and 21.4 ₽ from cache; for GLM 5.3 Flash — 8.4 and 1.7 ₽.
- The cache lives 5 minutes with sliding renewal — every request inside the window extends it. A continuous session keeps the cache alive from start to finish.
- A break longer than 5 minutes — the first turn after it pays the full input. One expensive turn after a pause is the norm, not an error.
Tactics:
- Planning and reading are cheap turns (input from cache, short output); do them freely and often — save on the model, not on the number of turns.
- A streak of edits in a row is cheaper than the same edits punctuated by coffee breaks: the cache doesn’t have time to go stale.
- Streaming is per-symbol — text appears as it’s generated; the price is unaffected.
What a typical session costs
Section titled “What a typical session costs”Let’s price a reconnaissance session on GLM 5.3 Flash (input 8.4 ₽ per 1M, from cache — 1.7 ₽): 25 turns of ~40K tokens of context each.
| Scenario | Session input |
|---|---|
| Without cache | 1M tokens × 8.4 ₽ ≈ 8.4 ₽ |
| With cache | first turn in full, then the prefix at 1.7 ₽ ≈ 2.6 ₽ |
A nuance: Flash’s cache discount is shallower than the flagships’ — repeated input costs ~20% of full price (for GPT-5.6 Sol it’s ~10%). But the absolute numbers are so small that long reconnaissance on Flash costs pennies either way; and the cache warmed on it keeps working when you switch to an expensive model in Code — the context is shared. The numbers are indicative: real volumes depend on the project.
The cache share of a response shows up in usage.prompt_tokens_details.cached_tokens — Kilo’s UI doesn’t display it, but when reconciling the bill with the dashboard it explains why a turn cost less than the full input.
Reasoning depth
Section titled “Reasoning depth”Our API accepts the reasoning_effort parameter: off, low, medium, high, xhigh, or max — the set depends on the model. Allowed values are listed in GET /v1/models → capabilities.reasoning_efforts; the can_disable_reasoning flag shows whether the model accepts off.
- Reasoning is billed as output tokens and consumes the response-length limit — long tasks need max-token headroom.
- If the agent or model settings don’t expose a depth knob, the model runs at its default — use the card in the catalog as a reference.
Tips for agentic work
Section titled “Tips for agentic work”- Built-in agents. Out of the box: Code (edits), Plan (planning), Ask (questions), Debug (diagnostics), plus Explore and General. The picker remembers the chosen model for each agent separately — set it up once: Plan and Ask on GLM 5.3 Flash, Code on GPT-5.6 Sol.
- Custom agents. Custom modes are created in Settings → Agent Behaviour → Agents, as markdown files
.kilo/agents/*.mdwith YAML frontmatter, or via theagentkey inkilo.jsonc. Themode: subagentproperty hides an agent from the picker — only other agents can invoke it;primaryshows it in the list. - Rules. The list of files and globs is set with the
instructionskey in the project’skilo.jsonc— for example,".kilo/rules/*.md"; global rules — in~/.config/kilo/kilo.jsonc. Format is markdown (recommended) or plain text. Project instructions take precedence over global ones.
A minimal project kilo.jsonc:
{ // wire up all project rules in one line "instructions": [ ".kilo/rules/*.md" ]}- Orchestrator is deprecated. Per Kilo’s docs, Orchestrator mode is deprecated: its scenarios are covered by agents with full tool access (Code, Plan) — delegate to them directly.
- Tools. All Mixen chat endpoints support
toolsandtool_choice; for agentic work choose models with tool calling and a large context.
Frugal session checklist
Section titled “Frugal session checklist”- Plan, Ask, and Explore — on GLM 5.3 Flash; Code and Debug — on GLM 5.3 or GPT-5.6 Sol.
- The model is assigned per agent — check that last week’s cheap one didn’t stay on Code.
- Reconnaissance and planning warm the shared cache — don’t spare the turns.
- A new task means a new chat: the old history gets paid for on every turn.
- After refreshing the model list, re-check IDs against the catalog.
Useful documentation
Section titled “Useful documentation”- Custom Modes / agents — built-in and custom agents, a model per agent.
- Custom Rules — the
instructionskey inkilo.jsonc. - Installing — VS Code, JetBrains, and the CLI.
- Mixen catalog — model IDs, prices, and cache columns.
Recommended models
Section titled “Recommended models”| Model | ID |
|---|---|
| GPT-5.6 Sol | openai/gpt-5.6-sol |
| Claude Opus 5 | anthropic/claude-opus-5 |
| GLM 5.3 | z-ai/glm-5.3 |
| DeepSeek V4 Pro | deepseek/deepseek-v4-pro |
| Kimi K3 | moonshotai/kimi-k3 |
Full list — in the catalog.
Troubleshooting
Section titled “Troubleshooting”- 401 / invalid API key — double-check the
mxn-…key in the provider’s API key field. - “Model Not Found” — the model wasn’t added to the provider or the ID has a typo; check the catalog.
- Model list doesn’t load / connection errors — make sure the Base URL is correct (
https://api.mixen.ai/v1) and the API is reachable from your network; models can also be entered manually. - Rules don’t apply — check the paths in
instructions(the key lives inkilo.jsonc, not the UI) and restart the chat session: changes are picked up by a new session. - An agent uses the wrong model — the picker remembers the choice per agent; switch the model while inside that agent.