Disclaimer: This project is a community project and is not maintained by the OpenCode team (https://opencode.ai/) and has no ties to the OpenCode team.
This extension provides OpenCode Zen models to VS Code via the Language Model Chat Provider API (vendor id: opencode).
- VS Code
^1.104 - Node.js (recent LTS recommended)
- An OpenCode API key (
OPENCODE_API_KEY)
npm installnpm run compilenpm run watchvsce package- Open this folder in VS Code
- Press
F5(Run → Start Debugging) - In the Extension Development Host, open Chat and enable the OpenCode Zen provider in the model picker.
Open the command palette (Ctrl/Cmd+Shift+P):
OpenCode Zen: Set API Key(opencodeZen.setApiKey)- Stores the key in SecretStorage (not in settings).
OpenCode Zen: Clear API Key(opencodeZen.clearApiKey)OpenCode Zen: Refresh Model List(opencodeZen.refreshModels)- Refetches models from
https://models.dev/api.json(filtered to provideropencode).
- Refetches models from
OpenCode Zen: Self Test(opencodeZen.selfTest)- Prompts for a model, then runs a small tool-calling roundtrip.
- Output is written to the OpenCode Zen Output Channel.
- Tool calling is supported by streaming
LanguageModelToolCallPartfrom the provider. - Tool execution is handled by the caller (VS Code) by sending back
LanguageModelToolResultParton the next request. - If no API key is configured, requests use
apiKey: publicand only free OpenCode Zen models are shown (matching opencode behavior).