Skip to main content

Overview

Kilo Code is an open-source AI coding assistant available in VS Code and the terminal. This version of the tutorial focuses on the VS Code extension, which embeds the Kilo runtime and does not require a separate CLI installation. By setting Kilo Code’s provider to OpenAI Compatible and pointing it at EvoLink, you can use EvoLink’s Claude family of models directly inside VS Code, enabling multi-model access through a single unified key.

Prefer the terminal?

Follow the dedicated Kilo Code CLI tutorial instead.

Before You Begin

1. Install the Kilo Code Extension

Search for Kilo Code in the VS Code Extension Marketplace and install it. After installation, the Kilo Code icon appears in the sidebar.
  • Log in to the EvoLink console
  • Find API Keys in the console, click the “Create New Key” button, then copy the generated key
  • The API Key usually starts with sk-. Please keep it safe.

Step 1: Configure the OpenAI Compatible Provider

Open Kilo Code’s Settings, select OpenAI Compatible under API Provider, then fill in:
  • Base URL: https://direct.evolink.ai/v1
  • API Key: enter your EvoLink API Key (the raw key — do not include the Bearer prefix)
Enter the raw key as your API Key — do not include the Bearer prefix. Kilo Code automatically adds the Bearer authentication header for you. If you manually enter Bearer sk-xxx, the gateway receives a double Bearer and returns 401 unauthorized Invalid API key directly.This is the exact opposite of pi (where pi requires you to enable Bearer manually). When configuring Kilo Code, follow this page rather than copying pi’s approach.
Entering the Base URL up to the /v1 root is sufficient. Kilo Code automatically appends the remaining path, so there’s no need to add /chat/completions manually.

Step 2: Select a Model (Auto-Fetched List)

Once you’ve entered the Base URL and API Key, Kilo Code automatically calls EvoLink’s /v1/models endpoint and renders the available models into the model selector. You can search for and select the model you want in the selector, for example:
  • Planning / complex reasoning: claude-fable-5
  • Everyday execution: claude-sonnet-5
  • Lightweight tasks: claude-haiku-4-5-20251001
There are many models — use search to locate one. EvoLink’s /v1/models returns all available models (including image, video, music, and other types), so the list is long. Type claude directly in the selector to filter and quickly find the Claude family.

Step 3: Manually Add Context Window

The OpenAI Compatible provider’s /v1/models returns only model IDs and does not return the context window or maximum output. When Kilo Code can’t detect these capabilities, it falls back to conservative defaults, which may cause long sessions to be truncated prematurely. The solution is to add a limit field for the models you use in Kilo Code’s configuration file kilo.jsonc (located at ~/.config/kilo/kilo.jsonc or in the project root as ./kilo.jsonc).
limit must be nested under provider.<providerID>.models.<modelID> — it cannot be written as a bare top-level field. A top-level "limit": {...} is not bound to any model, and Kilo won’t apply it. The correct structure nests it per model (<providerID> is the Provider ID you entered when setting up the custom provider; for OpenAI Compatible it defaults to openai-compatible).
A complete, ready-to-use configuration (with all three models set up):
Recommended values for each model:

Step 4: Verify the Configuration

After selecting a model, enter a simple question in the Kilo Code chat box to verify, for example:
What success looks like:
  • The model replies with content normally.
  • No errors such as 401, 404, or model_not_found appear.

Advanced: Model Division of Labor with Multiple Configuration Profiles

Kilo Code supports creating multiple OpenAI Compatible provider profiles, where switching profiles switches the model. You can use this to implement a manual division of labor — “an expensive model for planning, a cheaper model for execution” — for example: Switch to whichever profile matches the capability you need. All three profiles share the same EvoLink Base URL and key; only the model differs.

Troubleshooting

The following is organized by the actual error you see.

401 unauthorized (Invalid API key)

Possible causes:
  • The API Key includes the Bearer prefix (most common): Kilo Code adds Bearer automatically, so you only need to enter the raw key. Remove the prefix and re-enter it.
  • The key itself is invalid or has been disabled: verify it in the EvoLink console.

404 model_not_found

Cause: the selected model ID doesn’t match what /v1/models returns, or that model isn’t enabled. Go back to the model selector and pick a model that actually exists in the list.

Long sessions truncated prematurely / upstream reports context limit exceeded

Cause: the limit field wasn’t added manually, so Kilo Code used a conservative default context window. Follow Step 3 to fill in the real context / output values for the models you use.

Too many models in the selector to find Claude

Just type claude in the selector’s search box to filter. EvoLink’s /v1/models returns all available models, so a long list is normal.

FAQ

1. Should the API Key include the Bearer prefix?

No. Enter the raw key (the string starting with sk-). Kilo Code adds the Bearer authentication header automatically; including the prefix manually causes a double Bearer and returns 401.

2. Should the Base URL be /v1 or /v1/chat/completions?

Entering it up to the /v1 root is sufficient (https://direct.evolink.ai/v1). Kilo Code appends the remaining path automatically.

3. Why do I need to add the context window manually?

The OpenAI Compatible /v1/models doesn’t return the context window or maximum output, so Kilo Code uses conservative defaults when it can’t detect them. Entering the real values manually in the limit field of kilo.jsonc avoids long sessions being truncated.

4. How do I use an expensive model for planning and a cheaper model for execution?

Create multiple OpenAI Compatible profiles (such as default/heavy/budget); switching profiles switches the model, all sharing the same EvoLink key. The full Claude family (it also supports GPT, Gemini, and more, which you can view in the console). Common ones: claude-fable-5 (planning), claude-sonnet-5 (execution), claude-haiku-4-5-20251001 (lightweight).

6. How do I check usage?

Log in to the EvoLink console to view request volume, consumption, and token usage.
For more usage and configuration, refer to the Kilo Code VS Code documentation.