npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sachitv/opencode-kilo-code-provider

v1.1.1

Published

OpenCode provider plugin for the Kilo Code Gateway with dynamic model discovery.

Readme

@sachitv/opencode-kilo-code-provider

An OpenCode provider plugin for the Kilo Code Gateway.

This package is a separate OpenCode provider (not the built-in kilo provider). It dynamically fetches the model list from Kilo's OpenAI-compatible /models endpoint at startup and refreshes it when the active account changes in OpenCode 2, so you never have to hand-maintain model entries in your config.

The API key stays in OpenCode's credential store. The organization id is non-secret config sent as:

X-KiloCode-OrganizationId: your_org_id

The organization id is a UUID (e.g. xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) found in your Kilo dashboard URL.

Install

From npm

bun add @sachitv/opencode-kilo-code-provider

Then add it to your OpenCode 2 config:

{
  "$schema": "https://opencode.ai/config.json",
  "plugins": [
    {
      "package": "@sachitv/opencode-kilo-code-provider",
      "options": {
        "organizationId": "your_org_id",
        "defaultModel": "kilo-auto/free"
      }
    }
  ]
}

OpenCode 1 uses the singular plugin key and tuple form:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": [
    ["@sachitv/opencode-kilo-code-provider", { "organizationId": "your_org_id", "defaultModel": "kilo-auto/free" }]
  ]
}

From source (local development)

git clone https://github.com/sachitv/opencode-kilo-code-provider.git
cd opencode-kilo-code-provider
bun install
bun run build

For OpenCode 2 local development, expose the package through the discovered plugin directory. From the project where OpenCode runs, link the provider package root after building it:

mkdir -p .opencode/plugins
ln -s /absolute/path/to/opencode-kilo-code-provider .opencode/plugins/kilo-code

OpenCode 1 local development uses the plugin key with file:///absolute/path/to/opencode-kilo-code-provider/dist/index.js.

Add the API Key

Run OpenCode and connect the custom provider id:

/connect

Choose kilo-code and paste your Kilo Gateway API key. OpenCode stores it in its credential store. In OpenCode 1 this is ~/.local/share/opencode/auth.json; OpenCode 2 manages the connection through its integration API. Do not put the key in opencode.json.

OpenCode 2 refreshes the authenticated model list automatically after /connect or switching accounts. In OpenCode 1, restart once after /connect to refresh organization-scoped catalogs. The configured defaultModel remains usable immediately after connecting.

Use Models

Restart OpenCode after installing the plugin, then run:

/models

Models returned by Kilo's /models endpoint appear under Kilo Code Gateway. Use them as kilo-code/<model-id>:

{
  "model": "kilo-code/kilo-auto/free"
}

How It Works

The package supports both OpenCode 1 and OpenCode 2 from the same entrypoint. OpenCode 1 calls the legacy server export; OpenCode 2 calls the default export's setup function.

The package has two parts:

  • dist/provider.js exports createKiloCode, an AI SDK provider factory wrapping Kilo's OpenAI-compatible gateway at https://api.kilo.ai/api/gateway.
  • dist/index.js exports both plugin APIs. It registers auth, fetches models from GET /models, and points each discovered model at createKiloCode.

The provider reads credentials from OpenCode at request time. No keys are stored in config files.

Configuration Options

| Option | Required | Description | |--------|----------|-------------| | organizationId | No | Kilo organization id sent as X-KiloCode-OrganizationId. Required for org-scoped requests. | | defaultModel | No | Sets the model if none is already configured. Defaults to kilo-auto/free. | | providerID | No | Override the provider id (default: kilo-code). | | baseURL | No | Override the Kilo gateway base URL (default: https://api.kilo.ai/api/gateway). |

Development

This project uses Bun only. No npm.

bun install      # install deps
bun run check    # typecheck + test + build
bun test         # run tests
bun run build    # build dist/
bun run typecheck # typecheck only

License

MIT