OpenCode plugin for Kilo Code authentication with support for various models including Giga Potato
npm install opencode-kilocode-authAn OpenCode plugin for authenticating with Kilo Code and accessing various AI models, including the Giga Potato model - a stealth model optimized for agentic programming.
- Kilo Code Authentication: Login via browser-based device auth or manual token entry
- 300+ AI Models: Access to Claude, GPT, Gemini, DeepSeek, Llama, and more
- Giga Potato Model: Free stealth model optimized for agentic programming with vision support
- Model Selection: Browse and select from available models
- Zero Configuration: Automatic request routing through Kilo Code API
Add the plugin to your OpenCode configuration file (~/.config/opencode/opencode.json):
``json`
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
"opencode-kilocode-auth"
],
"provider": {
"kilocode": {
"models": {
"giga-potato": {}
}
}
},
"model": "kilocode/giga-potato"
}
1. Copy the plugin to your OpenCode plugins directory:
`bashCreate plugins directory
mkdir -p ~/.config/opencode/plugins
2. OpenCode will automatically load plugins from the
~/.config/opencode/plugins/ directory.$3
`bash
Navigate to your opencode config directory
cd ~/.config/opencodeInstall the plugin
bun add opencode-kilocode-authOr using npm
npm install opencode-kilocode-auth
`Then add to your
opencode.json:`json
{
"plugin": ["opencode-kilocode-auth"]
}
`Authentication
When you run OpenCode, you'll see "kilocode" as an available provider. Select it and choose an auth method:
1. Login with Kilo Code (OAuth): Opens browser for secure device auth
2. Enter Kilo Code API Token: Enter your API token directly
$3
1. Go to https://kilo.ai
2. Sign up or log in
3. Navigate to Settings → API Keys
4. Generate a new API key
Giga Potato Model
The Giga Potato model is a stealth model deeply optimized for agentic programming:
| Feature | Value |
|---------|-------|
| Model ID |
giga-potato |
| Context Window | 256K tokens |
| Max Output | 32K tokens |
| Vision Support | Yes (can analyze images) |
| Tool Support | Yes (write_file, edit_file) |
| Reasoning | Yes |
| Price | FREE |$3
Set it as your default model in
opencode.json:`json
{
"model": "kilocode/giga-potato"
}
`Or select it interactively when prompted for a model.
Available Models
$3
| Model | Description |
|-------|-------------|
|
giga-potato | Stealth model for agentic programming (256K context, vision) |
| x-ai/grok-code-fast-1 | xAI Grok optimized for fast code generation |
| mistralai/devstral-2512:free | Mistral's development model |
| corethink:free | CoreThink reasoning model |$3
| Model | Description |
|-------|-------------|
|
anthropic/claude-opus-4.5 | Latest Claude Opus |
| anthropic/claude-sonnet-4.5 | Latest Claude Sonnet |
| openai/gpt-5.2 | Latest GPT model |
| google/gemini-3-pro-preview | Gemini 3 Pro |
| deepseek/deepseek-r1 | DeepSeek reasoning model |Configuration Example
Full
opencode.json example:`json
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
"opencode-kilocode-auth"
],
"provider": {
"kilocode": {
"models": {
"giga-potato": {
"name": "Giga Potato",
"contextLength": 256000,
"maxTokens": 32000
},
"anthropic/claude-sonnet-4": {},
"openai/gpt-4o": {}
}
}
},
"model": "kilocode/giga-potato",
"agent": {
"build": {
"model": "kilocode/giga-potato"
}
}
}
`Environment Variables
| Variable | Description |
|----------|-------------|
|
KILOCODE_TOKEN | Pre-set your Kilo Code API token |
| KILOCODE_BACKEND_BASE_URL | Custom backend URL (for development) |How It Works
1. Authentication: Uses device auth flow (like GitHub CLI) or direct token entry
2. Request Routing: Intercepts AI requests and routes them through Kilo Code's OpenRouter-compatible API
3. Model Access: Provides access to 300+ models through a single authentication
4. Cost Tracking: Billing is handled by Kilo Code, costs show as $0 in OpenCode
Troubleshooting
$3
Make sure the plugin is properly installed:
`bash
Check if plugin is in node_modules
ls ~/.config/opencode/node_modules/opencode-kilocode-authOr check plugins directory
ls ~/.config/opencode/plugins/
`$3
1. Check your internet connection
2. Try logging in at https://kilo.ai first
3. Generate a new API token if the old one expired
$3
Make sure you're using the correct model ID format:
kilocode/model-nameFor example:
-
kilocode/giga-potato
- kilocode/anthropic/claude-sonnet-4Development
`bash
Clone the repo
git clone
cd opencode-kilocode-authInstall dependencies
bun installTest the API
bun run test/api-test.tsBuild
bun run build
``MIT
Ported from Kilo Code for OpenCode integration.