npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aaronsr-54/opencode-go-model-costs

v1.7.1

Published

OpenCode TUI plugin that shows Go provider models ranked by plan-quota burn rate (cost relative to each model's usage limit)

Readme

opencode-go-model-costs

OpenCode TUI plugin that ranks OpenCode Go models by plan-quota burn rate — how fast each model consumes your Go usage windows (5h / weekly / monthly) — directly in the sidebar.

screenshot

What it does

Adds a collapsible Costs panel to the session sidebar:

▼ Costs
[OpenCode Go]                     use/1M tok
  0.4x   ✦ MiMo-V2.6-Flash
  1.0x     MiniMax M2.7
  2.1x     Qwen3.8 Max
  ...
  • Left column — the burn multiplier relative to the baseline model (minimax-m2.7). 1.0x burns quota at the same rate as the baseline; higher is more expensive per unit of plan quota.
  • Right column — the model name. The currently active model is marked with ●; models released in the last 30 days carry a ✦ tag.
  • Click the Costs header to collapse/expand the panel. The collapsed state shows the model count and is remembered across sessions.

How it's calculated

Go meters usage as cost × (60 / model_usage_limit) against shared dollar windows (see the usage-limits table in the official docs). The plugin scores each model as:

burn = blended_cost_per_1M_tokens / usage_limit
mult = burn / burn(minimax-m2.7)

where blended_cost = input + output * 0.3 per 1M tokens.

Prices come from the provider catalog (models.dev). Usage limits are not hardcoded: they are parsed at runtime from the monthly-limit table on the official Go docs page (with the legacy go.md markdown endpoint tried first as a fallback), so models added/removed/changed upstream are picked up automatically. The fetched table is cached in the plugin's local storage for 12h and reused (even if stale) whenever the network is unavailable.

Name matching between the docs table and the catalog model ids ignores dots-vs-dashes, so the docs' claude-haiku-5.5 resolves to the catalog id claude-haiku-5-5.

The base Go table is used. Go Plus scales every limit by the same factor, so the relative rankings are identical.

Rendering rules

  • Colors — green (≤1.5x), yellow (≤5x), red (>5x). The tones come from the host theme (success / warning / error); both V1 palettes and V2 tokens are supported, so the panel keeps its colors when V2 hands over RGBA values or stateful (base / hovered / focused) wrappers instead of strings.
  • ? — the model has no price or no documented usage limit; it is not scored and is sorted last.
  • 0.0x — a free / unlimited model (e.g. longcat-2.5-preview-free), which consumes no quota.
  • ✦ — model released in the last 30 days.
  • Long model names are truncated with … so rows never overflow the sidebar.
  • If the limits table can't be loaded at all (offline with no cached copy), the panel shows a [OpenCode Go] limits unavailable notice instead of model rows.

Compatibility

Works on both OpenCode V1 and V2. The TUI entrypoint exports a dual module ({ id, tui, setup }): V1 loads the tui adapter and V2 loads the setup adapter, each on its own runtime API, and both share the same cost computation and panel rendering. The server entrypoint is likewise a no-op on either version. No extra configuration is needed beyond registering the plugin.

Theme colors are normalized to a single path: V1's RGBA palette, V2's resolved RGBA tokens and stateful tokens (and plain string colors from custom themes) all feed the same panel, so the burn-rate colors render identically on both.

After updating the package, restart OpenCode so V2 picks up the new panel; V2 loads plugin modules at startup and keeps the old one until you restart.

Install

Run the bundled init command:

npx @aaronsr-54/opencode-go-model-costs init

It registers the plugin in your global OpenCode config (~/.config/opencode/opencode.json, or opencode.jsonc if that's the one you have), creating the file with the OpenCode $schema when it doesn't exist yet. It preserves the rest of your config, including JSONC comments, and is idempotent: running it again when the plugin is already listed changes nothing.

Restart opencode and the sidebar will appear automatically.

Manual install

If you prefer, add the entry to your ~/.config/opencode/opencode.json yourself and restart opencode:

{
  "plugin": ["@aaronsr-54/opencode-go-model-costs"]
}

Migration

@aaronsr-54/openode-go-model-costs is deprecated. Replace it with @aaronsr-54/opencode-go-model-costs in your OpenCode configuration.

Usage

  • Toggle visibility: run /toggle-costs to show/hide the whole panel.
  • Collapse: click the ▼ Costs / ▶ Costs header.

Links