Skip to navigation

Kilo Code (gateway)

Route Kilo Code’s LLM calls through the Respan gateway for automatic logging, caching, and model switching. Kilo Code ships an OpenAI Compatible provider in both the editor extension and the CLI, so only your RESPAN_API_KEY is needed.

Setup

1

Install Kilo Code

Install the Kilo Code extension from the VS Code Marketplace (or your editor’s extension panel), then open it from the sidebar. For the terminal, install the CLI:

npm install -g @kilocode/cli
2

Add Respan as a custom provider

In the extension:

  1. Click the gear icon to open Kilo Code Settings and go to the Providers tab.
  2. Scroll to the bottom and click Custom provider.
  3. Fill in the dialog:
    • Provider ID: respan
    • Display name: Respan Gateway
    • Provider API: OpenAI Compatible
    • Base URL: https://api.respan.ai/api
    • API key: YOUR_RESPAN_API_KEY
    • Models: add gpt-4o and any other model IDs you want
  4. Click Submit to save.

Add model IDs by hand. Kilo Code’s automatic model detection queries /v1/models, which the gateway does not expose yet.

In the CLI, add the provider to ~/.config/kilo/kilo.json:

{
"$schema": "https://kilo.ai/config.json",
"provider": {
"respan": {
"npm": "@ai-sdk/openai-compatible",
"name": "Respan Gateway",
"options": {
"baseURL": "https://api.respan.ai/api",
"apiKey": "{env:RESPAN_API_KEY}"
},
"models": {
"gpt-4o": { "name": "GPT-4o" },
"claude-sonnet-4-5-20250929": { "name": "Claude Sonnet 4.5" }
}
}
},
"model": "respan/gpt-4o"
}

Then export the key:

export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"

No separate provider key needed. The Respan gateway handles provider authentication.

3

Start coding

Select your Respan provider and model in the chat panel, or run a task from the terminal:

kilo run -m respan/gpt-4o "your prompt"

All LLM calls now route through Respan.

Switch models

Add more model IDs to the provider and pick a different one from the model dropdown (or -m respan/<id> in the CLI) to use any of the 1000+ models available through the gateway.

gpt-4o
claude-sonnet-4-5-20250929
gemini/gemini-3.5-flash

See the full model list.