GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(server): add OpenCode 2 provider driver by tarik02 · Pull Request #12084 · pingdotgg/t3code

Conversation

@tarik02

@tarik02 tarik02 commented Sep 16, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

What Changed

Adds an opencode2 provider driver beside the existing opencode (v1) driver.

OpenCode 2 is a different architecture than v1 — one shared background service instead of a spawned per-thread server, and an Effect-native client instead of promises — so it can't be handled by the v1 driver.

  • opencode2Runtime.ts: connects to the background service (or a configured serverUrl), 2.x version gate, loads model/skill inventory.
  • OpenCode2Adapter.ts: drives turns from session.execution.* events; reconnects with backoff and reconciles, since v2 streams have no replay. Resume re-adopts a versioned session cursor, rollback forks, compaction is native.
  • buildOpenCode2SessionRules: maps T3 runtime modes onto server-enforced permission rules, so supervised modes hold on a shared server.
  • MCP: per-thread registrations carrying that thread's credential; rules deny every foreign registration so a restricted session can't run another thread's tools.
  • OpenCode2Provider / OpenCode2Driver: health + inventory probe, manual-only maintenance, text generation via generate.text.

Also registers the driver in the web and mobile pickers/settings, and adds OpenCode2Settings to contracts.

Why

T3 Code lists OpenCode as supported, but the v1 driver targets a different product and cannot connect to OpenCode 2. Users on v2 have no working path today.

Building on @opencode/client/effect avoids promise bridging, per-thread server processes, and string-matching on errors, and lets supervised modes be enforced server-side.

Verified against a live OpenCode 2.0.3 service: inventory loads, MCP tool calls work through the per-thread token, title generation succeeds, sessions resume across restarts.

Also, note that it uses official opencode Effect client instead of wrapping promise-based client like #8207 does. Besides this, runtime code was duplicated intentionally instead of reusing OpenCode 1's code - keeping it separate.

UI Changes

One provider entry: Settings row, model picker, icon mapping, default model openai/gpt-6-astra (v1-era gpt-5 is gone from the v2 catalog).

image image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Summary by CodeRabbit

  • New Features
    • Added OpenCode 2 as a supported provider.
    • Added model discovery, custom server connections, authentication, MCP support, permissions, attachments, and text generation.
    • Added OpenCode 2 configuration options, model selection support, and provider icons.
    • Added handling for unavailable OpenCode 2 models.
  • Bug Fixes
    • Preserved provider metadata and unavailable models for OpenCode and OpenCode 2.
    • Improved model variant handling and server health validation.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] and digitalbase reacted with thumbs up emoji digitalbase reacted with heart emoji
All reactions
  • 👍 2 reactions
  • ❤️ 1 reaction
Loading

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] left review comments
@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@tarik02 @juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.