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 — GitHub - marcodegra5/opencode-show-auto-router-model

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
dist
dist
 
 
docs
docs
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
gui.test.cjs
gui.test.cjs
 
 
gui.tsx
gui.tsx
 
 
index.ts
index.ts
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
read.test.ts
read.test.ts
 
 
read.ts
read.ts
 
 
rpc.ts
rpc.ts
 
 
tui.tsx
tui.tsx
 
 
vite.config.ts
vite.config.ts
 
 

Repository files navigation

OpenCode Show Auto Router Model

An OpenCode plugin that shows which model OpenRouter actually used when you pick a router model such as Auto Router. The Desktop pill above the composer shows the routed model and the cost of the last completed assistant call, when available. The terminal footer shows the routed model and session cost.

Desktop pill showing the routed model and last call cost

Compatibility

Tested with OpenCode Desktop 2.4.2 and @opencode/plugin 2.4.1.

Installation

Requires OpenCode with the experimental GUI plugin API and an OpenRouter connection. Clone this repository, then run:

npm ci
npm run build

Add the absolute path to the cloned directory to the plugins array in your global ~/.config/opencode/opencode.json. Select an OpenRouter router model such as openrouter/openrouter/auto and send a message. The plugin starts automatically; the pill appears once a routed model is detected.

Development

npm run build
npm test

The GUI bundle in dist/ is required by OpenCode Desktop. Rebuild it after editing gui.tsx.

Limitations

  • The Desktop GUI API is experimental. The pill's wrapping style targets internal Desktop markup (data-slot="session-plugin-pill" and its aria-label), so any OpenCode update may break it; long names then truncate again.
  • The displayed model is the latest detected primary response, not a history of models used. It is kept in memory and is lost when the OpenCode server restarts.
  • Desktop cost is the amount stored by OpenCode for the last completed assistant call, not the total for an entire user turn that may contain multiple calls. OpenCode may calculate the amount when the provider does not report it. The terminal footer shows session cost instead.

License

MIT

About

No description, website, or topics provided.

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

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.