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

opencode-kilo-auth

v1.1.4

Published

OpenCode plugin for Kilo Gateway authentication - access free AI models like z-ai/glm-5:free

Downloads

568

Readme

Kilo Auth Plugin for OpenCode

npm version npm downloads License: MIT

| | Follow @JungHoonGhae on GitHub for more projects. | | :-----| :----- | | | Follow @lucas_ghae on X for updates. |

Use Kilo Gateway with your existing OpenCode installation - no need to install Kilo CLI fork.

Disclaimer: This is an independent community plugin. It is not affiliated with, endorsed by, or sponsored by Kilo.ai or OpenCode. Kilo™ and OpenCode™ are trademarks of their respective owners.

Support

If this plugin helps you, consider supporting its maintenance:

The Problem

Kilo Gateway offers great free tier models, but to use them from CLI you had only one option:

Install Kilo CLI - A fork of OpenCode, requiring a separate installation

Neither is ideal. You shouldn't need to install a separate fork just to access Kilo Gateway models.

The Solution

This plugin lets you use Kilo Gateway directly in your existing OpenCode installation:

  • ✅ Keep using OpenCode (no Kilo CLI needed)
  • ✅ Access all Kilo Gateway models (342+ models)
  • ✅ Get free tier models not available on OpenRouter (e.g., z-ai/glm-5:free)
  • ✅ Simple plugin installation - just add to config

Free Models

Kilo Gateway offers 29 free tier models, including:

  • Step 3.5 Flash (Free) - StepFun's 196B MoE model with 256K context
  • GLM 5 (Free) - Z.ai's flagship model with 202K context
  • MiniMax M2.5 (Free) - 204K context with strong coding abilities
  • And 26 more free models...

Installation

Step 1: Add Plugin to Config

Open your ~/.config/opencode/opencode.json and add the plugin:

{
  "plugin": ["opencode-kilo-auth@latest"]
}

That's it! OpenCode will automatically install the plugin from npm on next startup.

Step 2: Add Models

Add the models you want to use. Important: You must include npm and api properties for the provider to work:

{
  "plugin": ["opencode-kilo-auth@latest"],
  "provider": {
    "kilo": {
      "name": "Kilo Gateway",
      "npm": "@openrouter/ai-sdk-provider",
      "api": "https://api.kilo.ai/api/openrouter/",
      "models": {
        "kilo/auto": {
          "id": "kilo/auto",
          "name": "Kilo Auto",
          "release_date": "2025-01-01",
          "attachment": true,
          "reasoning": true,
          "temperature": true,
          "tool_call": true,
          "limit": { "context": 200000, "output": 64000 }
        }
      }
    }
  }
}

Quick Setup with AI Assistant

See AI_INSTALL_GUIDE.md for prompts you can copy to your AI assistant for quick setup:

  • Free models only - 29 free tier models
  • Recommended models - Best models to get started
  • All models - Full 342 model setup
  • Custom selection - Pick specific models

How to Add More Models

  1. Open models.json
  2. Find the model you want (e.g., z-ai/glm-5:free)
  3. Copy the entire model object
  4. Paste into your opencode.json under provider.kilo.models

That's it! models.json is already in the correct format - just copy and paste.

Authentication

Authentication with Kilo Gateway is required to use any models.

Device Authorization Flow

  1. Run opencode auth login
  2. Select "Other" → type "kilo"
  3. Choose "Kilo Gateway (Device Authorization)"
  4. Open the URL in your browser
  5. Authorize the application
  6. Return to OpenCode

API Key Authentication

  1. Run opencode auth login
  2. Select "Other" → type "kilo"
  3. Choose "Kilo Gateway (API Key)"
  4. Enter your Kilo API key

Available Models

See models.json for the complete list of 342 models.

Recommended Models

| Model | Description | Context | Features | |-------|-------------|---------|----------| | kilo/auto | Auto-routes to best model | 200K | Vision, Reasoning, Tools | | stepfun/step-3.5-flash:free | StepFun 196B MoE - not free on OpenRouter | 256K | Reasoning, Tools | | z-ai/glm-5:free | GLM 5 free tier | 202K | Reasoning, Tools | | minimax/minimax-m2.5:free | MiniMax M2.5 free tier | 204K | Reasoning, Tools |

Free Tier Models (29 models)

All free tier models end with :free suffix:

  • z-ai/glm-5:free, z-ai/glm-4.5-air:free
  • minimax/minimax-m2.5:free
  • stepfun/step-3.5-flash:free
  • google/gemma-3-27b-it:free, google/gemma-3-12b-it:free, google/gemma-3-4b-it:free
  • qwen/qwen3-coder:free, qwen/qwen3-4b:free
  • And more...

Premium Models (313 models)

Premium models from all major providers:

  • Anthropic: Claude 3.5 Sonnet, Claude 3 Opus, Claude 3 Haiku
  • OpenAI: GPT-4o, GPT-4 Turbo, GPT-3.5 Turbo
  • Google: Gemini 1.5 Pro, Gemini 1.5 Flash
  • Meta: Llama 3.1, Llama 3.2
  • Mistral: Mistral Large, Mixtral

Usage

Command Line

opencode run "Hello" --model=kilo/kilo/auto
opencode run "Write a function" --model=kilo/z-ai/glm-5:free

In OpenCode TUI

  1. Start OpenCode: opencode
  2. Select "Connect provider" → "kilo"
  3. Authenticate with Device OAuth or API Key
  4. Select a model and start chatting

Troubleshooting

"kilo provider not found"

Make sure the plugin is installed:

{ "plugin": ["opencode-kilo-auth@latest"] }

"No models available"

Add model definitions to your opencode.json (see Installation above).

"Authentication failed"

  1. Try the API Key method instead of Device Authorization
  2. Check your network connection
  3. Verify your Kilo Gateway account is active at kilo.ai

Development

bun install
bun run typecheck
bun run build
bun run fetch-models  # Update models.json from Kilo API

Links

License

MIT - See LICENSE for details.

Contributing

Contributions are welcome! Feel free to submit a Pull Request at github.com/JungHoonGhae/opencode-kilo-auth.

Legal Notice

This project is provided "as is" without warranty of any kind. The use of Kilo Gateway API is subject to Kilo.ai's terms of service. Users are responsible for complying with all applicable terms and conditions when using this plugin.