Skip to content

Repository files navigation

opencode-kilocode-auth

Curated by CypherpunkSamurai

npm version License: MIT

One subscription. Every model. Install · Models · Configuration · Features


⚠️ DO NOT USE

KILO CODE BAN USERS OF THIRDPARTY TOOLS. USE AT YOUR OWN RISK.

FURTHER DEVELOPMENT TEMPORARILY PAUSED.

Alt text

Philosophy

"Your Kilocode Cloud, now in OpenCode."

OpenCode should be the gateway to any intelligence you own. This plugin bridges the gap, allowing you to use your Kilocode subscription directly within the OpenCode ecosystem. One command setup, zero configuration headaches.

┌─────────────────────────────────────────────────────────┐
│                                                         │
│  Kilocode API Key → Kilo Gateway → OpenCode             │
│  One command install, full model access, done.          │
│                                                         │
└─────────────────────────────────────────────────────────┘

Quick Start

npx -y opencode-kilocode-auth@latest

Then:

opencode auth login
# Select / Enter "Others"
# Enter "kilocode" when asked for provider id
# Enter your API key from https://app.kilo.ai

Configure Providers in your opencode.json(c) file like the example in the configuration section, or optionally run:

# run with nodejs or bun to install all free providers
node scripts/install.js
# for bun
bun run scripts/install.js

# You can install all models with --add-all
bun run scripts/install.js --add-all
# or install to a custom .opencode folder with --opencode-dir arg
# by default it will install to .opencode folder in ~/.config
bun run scripts/install.js --opencode-dir .opencode
# use --help to learn more.

Finally open OpenCode: Type /models --> type KiloCode --> pick a model.


Models

The plugin supports all models available through your Kilocode subscription. The default configuration includes these powerful models:

Model ID Name Description
x-ai/grok-code-fast-1 xAI: Grok Code Fast 1 High-speed reasoning & code generation (256k context)
mistralai/devstral-2512:free Mistral: Devstral 2 2512 Large context (262k) development model
giga-potato Giga Potato Multimodal reasoning model with image support
mistralai/devstral-small-2512:free Mistral: Devstral Small 2 2512 Efficient & fast development model
corethink:free CoreThink Deep reasoning capabilities

Configuration

The plugin automatically configures your opencode.jsonc. If you need to verify or manually adjust:

{
  "plugin": ["opencode-kilocode-auth"],
  "provider": {
    "kilocode": {
      "api": "openrouter",
      "models": {
        "x-ai/grok-code-fast-1": {
          "name": "xAI: Grok Code Fast 1",
          "reasoning": true,
          "limit": { "context": 256000, "output": 10000 }
        },
        "mistralai/devstral-2512:free": {
          "name": "Mistral: Devstral 2 2512",
          "limit": { "context": 262144, "output": 262144 }
        },
        "giga-potato": {
          "name": "Giga Potato",
          "reasoning": true,
          "limit": { "context": 256000, "output": 32000 }
        },
        "mistralai/devstral-small-2512:free": {
          "name": "Mistral: Devstral Small 2 2512",
          "limit": { "context": 262144, "output": 262144 }
        },
        "corethink:free": {
          "name": "CoreThink",
          "limit": { "context": 78000, "output": 8192 }
        }
      }
    }
  }
}

Note: The API endpoint https://api.kilo.ai/api/openrouter is handled internally.


Troubleshooting

  • Plugin not loading: Clear the OpenCode cache using rm -rf ~/.cache/opencode/node_modules/opencode-kilocode-auth.
  • Auth Errors: Run opencode auth login to refresh your credentials.
  • Logs: Use opencode --log-level DEBUG --print-logs for detailed output.

Links

Built for developers who value freedom and efficiency.

About

KiloCode API auth provider for OpenCode

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages