Skip to content

highvoltz/vsc-opencode-zen-chat-provider

 
 

Repository files navigation

OpenCode Zen – VS Code Chat Model Provider

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)

  1. Open this folder in VS Code
  2. Press F5 (Run → Start Debugging)
  3. 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 provider opencode).
  • 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 LanguageModelToolCallPart from the provider.
  • Tool execution is handled by the caller (VS Code) by sending back LanguageModelToolResultPart on the next request.
  • If no API key is configured, requests use apiKey: public and only free OpenCode Zen models are shown (matching opencode behavior).

About

VS Code Chat Provider for OpenCode Zen

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 99.3%
  • JavaScript 0.7%