Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate FoundPR #5709: feat: api.kilo.ai/api support Why it might be related: This PR appears to address Kilo support, potentially overlapping with the current PR #13765 which adds Kilo as a native provider. Both seem to be related to integrating Kilo API support, though the current PR appears to be a more comprehensive native provider implementation. Please verify if PR #5709 is a duplicate, merged, or an earlier iteration that this PR supercedes. |
|
Technically this is a backport, Kilo cli forked opencode, so we're just bringing the family back together here. |
Adds Kilo (kilo.ai) as a built-in provider that dynamically fetches available models from the Kilo Gateway API at startup. - Add fetchKiloModels() to provider.ts — fetches model catalog from api.kilo.ai/api/gateway/models, maps pricing/capabilities/limits to opencode's schema - Register Kilo in CUSTOM_LOADERS with autoload and baseURL - Always inject a minimal database entry so Kilo appears in provider list before auth (lets users discover and select it) - Add Kilo to CLI auth login flow with priority and info message - Add Kilo to TUI provider dialog with priority and description - Add 7 provider tests covering dynamic model loading, error handling, and config-based setup
b67b15f to
6d650ff
Compare
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/modelsat startup, so users don't need to manually configure models inopencode.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 messagedialog-provider.tsx— Kilo in TUI provider dialog with priority and descriptionprovider.test.ts— 7 tests covering dynamic model loading, error handling, and config-based setupFixes #13767
How did you verify your code works?