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).
Prerequisites
- VS Code
^1.104 - Node.js (recent LTS recommended)
- An OpenCode API key (
OPENCODE_API_KEY)
Install
npm install
Build
npm run compile
Watch
npm run watch
Create Extension Package
vsce package
Run (Extension Development Host)
- 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.
Commands
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.
Notes
- 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).
Credits
This extension is a fork of wienans/vsc-opencode-zen-chat-provider.
This fork adds DeepSeek V4, Kimi 2.6 reasoning_content replay support for OpenCode Zen Go models, fixing the issue where thinking-mode tool calls fail because reasoning_content is not passed back to the API.
Original project: https://github.com/wienans/vsc-opencode-zen-chat-provider
License: MIT