Files
Mark IJbema 1d69a2b442 feat(gateway): send version headers on notification requests
Wire fetchKilocodeNotifications up to the shared header helpers
(getDefaultHeaders + buildKiloHeaders) so notification requests carry
User-Agent, X-KILOCODE-EDITORNAME, and org headers instead of only
Authorization/Content-Type. Also set KILOCODE_VERSION to the extension
version when spawning kilo serve so the extension version flows into the
User-Agent, letting the backend discriminate on extension version.
2026-07-06 12:33:26 +02:00
..
2026-07-03 17:10:11 +00:00
2026-01-26 17:42:40 +01:00

@kilocode/kilo-gateway

Unified Kilo Gateway package for OpenCode providing authentication, AI provider integration, and API access.

Features

  • Authentication: Device authorization flow for Kilo Gateway
  • AI Provider: OpenRouter-based provider with Kilo Gateway integration
  • API Integration: Profile, balance, and model management
  • TUI Helpers: Utilities for terminal UI components

Installation

bun add @kilocode/kilo-gateway

Usage

Plugin Registration

import { KiloAuthPlugin } from "@kilocode/kilo-gateway"

// Register with OpenCode
const plugins = [KiloAuthPlugin]

Provider Usage

import { createKilo } from "@kilocode/kilo-gateway"

const provider = createKilo({
  kilocodeToken: process.env.KILOCODE_API_KEY,
  kilocodeOrganizationId: "org-123",
})

const model = provider.languageModel("anthropic/claude-sonnet-4")

API Access

import { fetchProfile, fetchBalance } from "@kilocode/kilo-gateway"

const profile = await fetchProfile(token)
const balance = await fetchBalance(token)

License

MIT