OpenCode
Use Whiskers from OpenCode.
There are two ways to set up OpenCode:
Automatic (setup script)
RecommendedThe setup script does the manual steps for you: it checks your key, writes OpenCode's config, keeping what's already in the file, and saves the key in your environment. Run it again to pick up new models, change the key, or undo the setup.
curl -fsSL https://whiskers.nyuu.dev/setup.sh | sh -s -- --agents opencode
& ([scriptblock]::Create((irm https://whiskers.nyuu.dev/setup.ps1))) -Agents opencode
Faster still: create a key on the Keys page and choose OpenCode there. You get this command with everything filled in, key included, so there's nothing to answer.
- 1
Put your API key in an environment variable
Add this to your shell profile (~/.zshrc, ~/.bashrc), with your key from the Keys page.
~/.zshrcexport WHISKERS_API_KEY=sk-...
- 2
Add Whiskers as a provider
In ~/.config/opencode/opencode.json, or opencode.json in a project. If the file exists, merge the provider entry into it.
More models
Each of these is a setting OpenCode already has, shown by its own name. Leave one as it is and it keeps its default.
~/.config/opencode/opencode.json{ "$schema": "https://opencode.ai/config.json", "provider": { "whiskers": { "npm": "@ai-sdk/openai-compatible", "name": "Whiskers", "options": { "baseURL": "https://whiskers.nyuu.dev/v1", "apiKey": "{env:WHISKERS_API_KEY}" }, "models": { "deepseek-v4.1-flash": { "name": "deepseek-v4.1-flash", "tool_call": true, "reasoning": true, "attachment": true, "temperature": true, "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 131000 } }, "deepseek-v4.1-flash-abliterated": { "name": "deepseek-v4.1-flash-abliterated", "tool_call": true, "reasoning": true, "attachment": true, "temperature": true, "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 128000 } }, "deepseek-v4.1-flash-ultrafast": { "name": "deepseek-v4.1-flash-ultrafast", "tool_call": true, "reasoning": true, "attachment": true, "temperature": true, "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 131000 } }, "glm-5.3": { "name": "glm-5.3", "tool_call": true, "reasoning": true, "attachment": false, "temperature": true, "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 131000 } }, "glm-5.3-abliterated": { "name": "glm-5.3-abliterated", "tool_call": true, "reasoning": true, "attachment": false, "temperature": true, "modalities": { "input": [ "text" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 128000 } }, "glm-5.3-flash": { "name": "glm-5.3-flash", "tool_call": true, "reasoning": true, "attachment": true, "temperature": true, "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 131000 } }, "glm-5.3-flash-abliterated": { "name": "glm-5.3-flash-abliterated", "tool_call": true, "reasoning": true, "attachment": true, "temperature": true, "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 128000 } }, "glm-5.3-flash-ultrafast": { "name": "glm-5.3-flash-ultrafast", "tool_call": true, "reasoning": true, "attachment": true, "temperature": true, "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 131000 } }, "kimi-k3": { "name": "kimi-k3", "tool_call": true, "reasoning": true, "attachment": true, "temperature": false, "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 131000 } }, "kimi-k3.1-pro": { "name": "kimi-k3.1-pro", "tool_call": true, "reasoning": true, "attachment": true, "temperature": false, "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 131000 } }, "kimi-k3.1-pro-abliterated": { "name": "kimi-k3.1-pro-abliterated", "tool_call": true, "reasoning": true, "attachment": true, "temperature": true, "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 128000 } }, "qwen3.8-27b": { "name": "qwen3.8-27b", "tool_call": true, "reasoning": true, "attachment": true, "temperature": true, "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 131000 } }, "qwen3.8-flash": { "name": "qwen3.8-flash", "tool_call": true, "reasoning": true, "attachment": true, "temperature": true, "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 982000, "output": 131000 } }, "qwen3.8-omni-flash": { "name": "qwen3.8-omni-flash", "tool_call": true, "reasoning": true, "attachment": true, "temperature": true, "modalities": { "input": [ "text", "image" ], "output": [ "text" ] }, "limit": { "context": 1000000, "output": 128000 } } } } } } - 3
Start it
Run opencode, then type /models and pick a model under Whiskers.
shellopencode
The config lists today's models. When new ones appear on Models and pricing, copy it again.