[PR #13765] feat: add Kilo as a native provider #14805

Open
opened 2026-02-16 18:19:33 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13765

State: open
Merged: No


What does this PR do?

Adds Kilo as a built-in provider. Kilo's gateway is OpenAI-compatible, so this mostly wires up model discovery and auth — no new SDK needed.

The main thing: models are fetched dynamically from api.kilo.ai/api/gateway/models at startup, so users don't need to manually configure models in opencode.json. Select Kilo from the provider list, enter your API key, and all available models show up.

Changes:

  • provider.tsfetchKiloModels() hits the Kilo models endpoint, maps pricing/capabilities/limits to opencode's schema. Kilo entry is always injected into the database (even before auth) so it appears in the provider list. Models populate once authenticated.
  • auth.ts — Kilo in CLI auth login flow with priority and info message
  • dialog-provider.tsx — Kilo in TUI provider dialog with priority and description
  • provider.test.ts — 7 tests covering dynamic model loading, error handling, and config-based setup

Fixes #13767

How did you verify your code works?

  • Full test suite passes (985 pass, 5 skip, 0 fail)
  • Typecheck passes (all 12 packages)
  • Tested against live Kilo Gateway — 346 models fetched, chat completions working
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13765 **State:** open **Merged:** No --- ### What does this PR do? Adds [Kilo](https://kilo.ai) as a built-in provider. Kilo's gateway is OpenAI-compatible, so this mostly wires up model discovery and auth — no new SDK needed. The main thing: models are fetched dynamically from `api.kilo.ai/api/gateway/models` at startup, so users don't need to manually configure models in `opencode.json`. Select Kilo from the provider list, enter your API key, and all available models show up. **Changes:** - `provider.ts` — `fetchKiloModels()` hits the Kilo models endpoint, maps pricing/capabilities/limits to opencode's schema. Kilo entry is always injected into the database (even before auth) so it appears in the provider list. Models populate once authenticated. - `auth.ts` — Kilo in CLI auth login flow with priority and info message - `dialog-provider.tsx` — Kilo in TUI provider dialog with priority and description - `provider.test.ts` — 7 tests covering dynamic model loading, error handling, and config-based setup Fixes #13767 ### How did you verify your code works? - [x] Full test suite passes (985 pass, 5 skip, 0 fail) - [x] Typecheck passes (all 12 packages) - [x] Tested against live Kilo Gateway — 346 models fetched, chat completions working
yindo added the pull-request label 2026-02-16 18:19:33 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14805