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.
Paste this into your coding agent:
Help me set up the Respan gateway with the Kilo Code integration.
Follow https://www.respan.ai/docs/integrations/gateway/kilo-code.mdSetup
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/cliAdd Respan as a custom provider
In the extension:
- Click the gear icon to open Kilo Code Settings and go to the Providers tab.
- Scroll to the bottom and click Custom provider.
- Fill in the dialog:
- Provider ID:
respan - Display name:
Respan Gateway - Provider API:
OpenAI Compatible - Base URL:
https://gateway.respan.ai - API key:
YOUR_RESPAN_API_KEY - Models: add
gpt-4oand any other model IDs you want
- Provider ID:
- Click Submit to save.
Kilo Code detects models by calling /v1/models on the base URL, which Respan serves at GET /api/v1/models. You can also add model IDs by hand.
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://gateway.respan.ai",
"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.
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-flashSee the full model list .