Skip to Content

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.md

Setup

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:

Terminal
npm install -g @kilocode/cli

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://gateway.respan.ai
    • API key: YOUR_RESPAN_API_KEY
    • Models: add gpt-4o and any other model IDs you want
  4. 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:

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:

Terminal
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:

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 .