OpenCode
Use o Whiskers no OpenCode.
Há dois jeitos de configurar o OpenCode:
Automático (script de configuração)
RecomendadoO script de configuração faz os passos manuais por você: confere a sua chave, escreve a configuração do OpenCode, mantendo o que já está no arquivo, e guarda a chave no seu ambiente. Rode de novo para pegar modelos novos, trocar a chave ou desfazer a configuração.
curl -fsSL https://whiskers.nyuu.dev/setup.sh | sh -s -- --agents opencode
& ([scriptblock]::Create((irm https://whiskers.nyuu.dev/setup.ps1))) -Agents opencode
Mais rápido ainda: crie uma chave na página Chaves e escolha ali o OpenCode. Você recebe este comando com tudo preenchido, inclusive a chave, sem nada para responder.
- 1
Guarde a sua chave de API numa variável de ambiente
Adicione isto ao perfil do seu shell (~/.zshrc, ~/.bashrc), com a sua chave da página Chaves.
~/.zshrcexport WHISKERS_API_KEY=sk-...
- 2
Adicione o Whiskers como provedor
Em ~/.config/opencode/opencode.json, ou em opencode.json num projeto. Se o arquivo já existir, junte a entrada do provedor a ele.
Mais modelos
Cada um destes é uma configuração que o OpenCode já tem, com o nome que ele usa. O que você não mudar fica no padrão.
~/.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
Inicie
Rode opencode, digite /models e escolha um modelo em Whiskers.
shellopencode
A configuração lista os modelos de hoje. Quando aparecerem novos em Modelos e preços, copie de novo.