Kilo Gateway (Kilocode)

Unified API with smart routing model (kilo/auto) that selects best model per task. Auto-discovers available models. OpenAI-compatible with Bearer token auth.

Kilo Code (formerly Kilocode) is an open-source AI coding agent platform based in Amsterdam, offering extensions for VS Code, JetBrains, and a CLI interface. Its gateway component provides a unified API with smart routing — the kilo/auto model intelligently selects the best underlying model for each task based on complexity, cost, and capability. The Kilo Gateway is particularly interesting for coding workflows. Rather than selecting a specific model upfront, you can use kilo/auto to let the platform analyze your request and route it to the most appropriate model. For a simple code completion, it might route to a fast, cheap model; for complex architectural reasoning, it might select a frontier model. This smart routing approach is similar to what OpenRouter's auto mode offers but is specifically optimized for coding tasks. For OpenClaw, the Kilo Gateway serves as a coding-specialized gateway. The kilo/auto model supports thinking, vision, tool use, and streaming — all the capabilities needed for a full coding agent experience. The platform also provides auto-discovery of available models, so OpenClaw can dynamically detect what's available. Kilo Code's open-source nature (the VS Code extension and CLI are fully open source) means the community can inspect and contribute to the routing logic. The company is positioned as a developer-first platform with transparency about how model selection works. While the gateway API itself is a hosted service requiring an API key, the client-side tools are community-driven.

Tags: gateway, smart-routing, auto-discovery, openai-compatible, coding-agent, vscode, jetbrains

Use Cases

  • Smart model routing for coding tasks — auto-selects best model per request
  • Open-source coding agent alternative to Cursor or GitHub Copilot
  • VS Code and JetBrains IDE integration for AI-assisted development
  • CLI-based coding agent for terminal workflows
  • Cost-optimized coding by routing simple tasks to cheap models and complex ones to frontier models
  • Gateway for teams who want automatic model selection without manual configuration

Tips

  • Use kilo/auto for coding tasks where you don't have a strong model preference — it optimizes selection automatically.
  • For OpenClaw, Kilo Gateway is best as a coding-specific provider alongside a general-purpose provider like Anthropic.
  • Check the response headers or metadata to see which underlying model kilo/auto selected for each request.
  • The open-source VS Code extension can be used alongside OpenClaw for IDE-integrated coding workflows.
  • For predictable pricing, specify a model directly instead of using kilo/auto.
  • Kilo Gateway supports the OpenAI completions format — compatible with any tool that speaks OpenAI API.

Known Issues & Gotchas

  • kilo/auto smart routing means you don't always know which underlying model is handling your request.
  • Pricing with kilo/auto can be unpredictable since it selects models of varying cost per task.
  • The gateway is primarily designed for coding tasks. General-purpose agent use may not benefit from the coding-optimized routing.
  • Relatively newer platform compared to OpenRouter or Vercel AI Gateway — smaller community and less documentation.
  • The open-source extensions (VS Code, JetBrains) are separate from the gateway API. Don't confuse the two.
  • Smart routing decisions are opaque — you can see which model was selected but not why.
  • CLI interface and API may have different feature sets and rate limits.

Alternatives

  • OpenRouter (auto)
  • Cursor
  • Anthropic (Claude)
  • OpenAI Codex

Community Feedback

Kilo Code is like having Cursor's smart model routing but as an open-source VS Code extension. The auto-routing picks good models for different task types.

— Reddit r/vscode

The kilo/auto model is clever — it figures out which model fits the task. But sometimes you want explicit control over which model runs your code.

— Reddit r/ClaudeCode

Kilo Code being fully open source is a differentiator. You can see exactly how the routing logic works, unlike proprietary alternatives.

— GitHub Discussions

Configuration Examples

Basic Kilo Gateway setup

providers:
  kilocode:
    apiKey: your-kilocode-api-key
    model: kilocode/kilo/auto

Kilo as coding-specific provider

providers:
  anthropic:
    apiKey: sk-ant-xxxxx
    model: anthropic/claude-sonnet-4-6
  kilocode:
    apiKey: your-kilocode-api-key
    model: kilocode/kilo/auto
    # Smart routing for coding tasks
    # Switch with: /model kilocode/kilo/auto