Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/console-transition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"opencode-bridge-copilot-chat": minor
---

Transition OpenCode Zen into OpenCode Console, matching upstream's consolidation of the Zen gateway into the Console.

- The `opencodezen` provider group is removed; former Zen entries now live in the OpenCode Console group against the same `https://opencode.ai/zen/v1` gateway. Console and Go both accept a service-account API key and the Console device-code flow, mirroring upstream's two sign-in methods. Stored Zen API keys, `opencode.defaultMode` values, inline-suggestion gateway values, and usage history migrate automatically.
- Console model catalogs: service-account keys load the shared public `/models` catalog with free-only filtering, while device-code profiles keep the organization-scoped `/api/config` discovery.
- Refreshed live model catalogs with new Console models (`jev-1.13`, `jev-1.13-free`, `fledge-alpha-free`) and new Go models (`deepseek-v4-pro`, `mimo-v2.6-flash`, `mimo-v2.6-pro`, `gpt-6-luna`, `grok-4.7`, `qwen3.8-max/flash`), with supplemental metadata for discovery-only ids not yet in models.dev.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@

<h1 align="center">OpenCode for Copilot Chat</h1>

<p align="center">Use OpenCode Zen, OpenCode Go, and OpenCode Console models directly from the GitHub Copilot Chat model picker in Visual Studio Code.</p>
<p align="center">Use OpenCode Console and OpenCode Go models directly from the GitHub Copilot Chat model picker in Visual Studio Code.</p>

<p align="center">
<a href="https://github.com/grikomsn/opencode-copilot-chat/releases/latest"><img src="https://img.shields.io/github/v/release/grikomsn/opencode-copilot-chat?style=flat-square&logo=github&label=Release" alt="Latest GitHub release"></a>
<a href="https://github.com/grikomsn/opencode-copilot-chat/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/grikomsn/opencode-copilot-chat/ci.yml?branch=main&style=flat-square&label=CI" alt="CI status"></a>
<a href="https://github.com/grikomsn/opencode-copilot-chat/blob/main/LICENSE"><img src="https://img.shields.io/github/license/grikomsn/opencode-copilot-chat?style=flat-square" alt="MIT license"></a>
</p>

This native VS Code `LanguageModelChatProvider` registers Zen, Go, and Console as separate provider groups and streams their responses into Copilot Chat without a local proxy. VS Code 1.125 exposes the provider-entry configuration through the built-in Language Models UI; the packaged extension does not enable proposed APIs.
This native VS Code `LanguageModelChatProvider` registers Console and Go as separate provider groups and streams their responses into Copilot Chat without a local proxy. VS Code 1.125 exposes the provider-entry configuration through the built-in Language Models UI; the packaged extension does not enable proposed APIs.

> [!IMPORTANT]
> Visual Studio Marketplace publishing is temporarily paused. Install and update the extension by sideloading the VSIX attached to the [latest GitHub release](https://github.com/grikomsn/opencode-copilot-chat/releases/latest).

## Highlights

- Separate OpenCode Zen, Go, and Console model groups
- API-key and Console device-code authentication in VS Code Secret Storage
- Credential-scoped live discovery, with six-hour persisted models.dev enrichment for Zen and Go
- Separate OpenCode Console and Go model groups
- Service-account API keys and Console device-code authentication in VS Code Secret Storage
- Credential-scoped live discovery, with six-hour persisted models.dev enrichment for Console and Go
- Streaming text, reasoning, image inputs, and agent-mode tool calls
- Model-specific Thinking Effort and Qwen thinking-budget controls
- Bounded gateway retries and context-aware token limits
Expand All @@ -31,15 +31,15 @@ This native VS Code `LanguageModelChatProvider` registers Zen, Go, and Console a

1. Download the `.vsix` asset from the [latest GitHub release](https://github.com/grikomsn/opencode-copilot-chat/releases/latest). You need VS Code 1.125 or newer and GitHub Copilot Chat.
2. In VS Code, open **Extensions**, select the **…** menu, choose **Install from VSIX…**, and select the downloaded file. Alternatively, run `code --install-extension ./opencode-bridge-copilot-chat-<version>.vsix --force`.
3. For Zen or Go, open **Manage Language Models**, choose **Add Models**, select the provider, name the entry, and paste its API key.
4. For Console, run **OpenCode: Add Console Account**, choose a profile ID, then add an OpenCode Console entry with the same ID in **Manage Language Models**.
3. For Console or Go, open **Manage Language Models**, choose **Add Models**, select the provider, name the entry, and paste its service-account API key (Console entries can omit the key and use a device-code profile instead).
4. For Console device-code sign-in, run **OpenCode: Add Console Account**, choose a profile ID, then add an OpenCode Console entry with the same ID in **Manage Language Models**. Go can also sign in with the same Console device-code flow from the Manage Connection menu.
5. Repeat either flow for another account or key, then enable the models you want in Copilot Chat.

VS Code cannot automatically update a sideloaded build from GitHub. To update, download the newest VSIX from the latest release and repeat step 2; the newer build replaces the installed version while preserving the extension's stored settings and credentials.

While Marketplace publishing is paused, the extension checks GitHub Releases at most once every 24 hours. When a newer VSIX is available, it shows a one-time notification with a link to the release and sideloading guidance.

Composer controls override workspace defaults; ordered effort controls default to High, binary controls default On, and Qwen defaults Auto. Zen and Go use each entry's authenticated live catalog, while Console shows only models enabled for that profile's selected organization. Click the OpenCode status-bar item to inspect tokens for the most recently used entry.
Composer controls override workspace defaults; ordered effort controls default to High, binary controls default On, and Qwen defaults Auto. Console and Go use each entry's authenticated live catalog, while a Console device-code profile shows only models enabled for that profile's selected organization. Click the OpenCode status-bar item to inspect tokens for the most recently used entry.

## Documentation

Expand Down
26 changes: 15 additions & 11 deletions docs/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,43 @@

The extension discovers the catalog available to each configured provider entry
from that gateway's live `models` endpoint: `https://opencode.ai/zen/v1/models`
for Zen and `https://opencode.ai/zen/go/v1/models` for Go. Live responses
for Console and `https://opencode.ai/zen/go/v1/models` for Go. (The paths retain
the historical `zen` segment upstream; the former Zen gateway is now Console's
pay-as-you-go inference service.) Live responses
provide names, context windows, maximum output lengths, reasoning support and
effort options, image input, and tool-calling support used by Copilot Chat.
Zen free-tier entries can be filtered to cost-free models only.
Console free-tier entries can be filtered to cost-free models only.

Console entries skip public discovery: models come from the selected
Console device-code profiles skip public discovery: models come from the selected
organization's configuration on the Console server and never show public or
other-organization models.
other-organization models. Console service-account key entries use the public
discovery catalog like Go.

Fields the live responses omit are enriched from the canonical `opencode` and
`opencode-go` providers in a six-hour models.dev snapshot
(`https://models.dev/api.json`) stored in VS Code `globalState`. Stale metadata
is returned immediately while refresh runs and remains available during
models.dev outages. Models served by discovery before models.dev catalogs them
use a small supplemental entry — currently the Go-only ids `hy3-preview`,
`deepseek-flash`, `minimax-m2.5`, `kimi-k2.5`, `glm-5.1`, `glm-5`, and
`qwen3.5-plus` —
`deepseek-flash`, `minimax-m2.5`, `kimi-k2.5`, `glm-5.1`, `glm-5`,
`qwen3.5-plus`, `mimo-v2-pro`, `mimo-v2-omni`, and `omen-alpha`, plus the
Console-only ids `jev-1.13` and `jev-1.13-free` —
which is superseded by the canonical upstream entry once it lands. Discovery
also serves legacy alias ids (currently the Go id `deepseek-flash` for
`deepseek-v4.1-flash`); the alias is hidden whenever the canonical id appears
in the same discovery response.

Successful Zen and Go catalog results are cached per entry (mode, free-only
Successful Console and Go catalog results are cached per entry (mode, free-only
scope, and a fingerprint of the credential) for up to 24 hours in
`globalState`. When discovery fails or no key is configured, the extension
falls back to the cached catalog and then to a bundled snapshot:

| Gateway | Model | Context |
| --- | --- | ---: |
| Zen | DeepSeek V4 Flash Free | 200K |
| Zen | Nemotron 3 Ultra Free | 1M |
| Zen | Big Pickle | 200K |
| Zen | Kimi K2.5 | 256K |
| Console | DeepSeek V4 Flash Free | 200K |
| Console | Nemotron 3 Ultra Free | 1M |
| Console | Big Pickle | 200K |
| Console | Kimi K2.5 | 256K |
| Go | Kimi K2.6 | 256K |
| Go | DeepSeek V4 Flash | 1M |
| Go | MiniMax-M3 | 1M |
Expand Down
4 changes: 2 additions & 2 deletions docs/security.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Credential handling

Zen and Go API keys added through **Manage Language Models** are marked as secret provider configuration, so VS Code stores every entry securely. The extension places only a short SHA-256-derived reference in model metadata and local usage state. The older command-managed Zen and Go defaults remain in Secret Storage for migration and development workflows.
Console and Go API keys added through **Manage Language Models** are marked as secret provider configuration, so VS Code stores every entry securely. The extension places only a short SHA-256-derived reference in model metadata and local usage state. The older command-managed Console (formerly Zen) and Go defaults remain in Secret Storage for migration and development workflows.

Console access and refresh tokens are obtained only through an explicit device-code sign-in initiated in VS Code and stored per named profile in VS Code Secret Storage, with separate refresh locks and organization selection. The extension does not read credentials or sessions from OpenCode or other applications on the local machine.

The output channel records only status and metadata. It does not record API keys, access tokens, refresh tokens, prompts, response text, or account data.

## Inline completions

When `opencode.inlineSuggestions` is enabled, each suggestion request sends a bounded window of the current document (a fixed number of lines before the cursor and a bounded suffix after it) plus the stored Zen or Go API key to the OpenCode gateway's chat-completions endpoint. Upstream error bodies are never surfaced or logged because they can echo prompt context. Suggestion text flows only into the editor's ghost text; document context, prompts, and keys are never written to logs or storage. The feature is disabled by default and can be turned off at any time.
When `opencode.inlineSuggestions` is enabled, each suggestion request sends a bounded window of the current document (a fixed number of lines before the cursor and a bounded suffix after it) plus the stored Console or Go API key to the OpenCode gateway's chat-completions endpoint. Upstream error bodies are never surfaced or logged because they can echo prompt context. Suggestion text flows only into the editor's ghost text; document context, prompts, and keys are never written to logs or storage. The feature is disabled by default and can be turned off at any time.
Loading
Loading