Oc Model Speed
TUI sidebar panel showing time to first token and tokens per second for the current session
0
422
近 7 天 422
36.1
生态多维模型
5 天前
2026-09-30
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["oc-model-speed@0.1.2"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["oc-model-speed@0.1.2"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D oc-model-speedOpenCode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
A collection of opencode TUI sidebar plugins. Each panel is a small, standalone plugin published as its own npm package, so you can install only the ones you want.
| Package | Panel | Shows |
|---|---|---|
ocgo-usage-tui |
OCGO Usage | OpenCode Go rolling (5h), weekly and monthly limits, with time until each resets |
oc-session-context |
Session Context | Context window used this session, the model's limit, and session cost |
oc-model-speed |
Model Speed | Time to first token (TTFT) and tokens per second for the latest turn |
OCGO Usage
Rolling █░░░░░░░░░░░░░░░ 3% 2h19m
Weekly █░░░░░░░░░░░░░░░ 3% 6d4h
Monthly ███████████░░░░░ 69% 5d23h
Session Context
█████░░░░░░░░░░░░░░░░░░░ 42%
86,120 of 200,000 / $0.42
Model Speed
TTFT 1.2s
TPS 25.3
Requirements
- opencode 1.18 or newer
- For the usage panel, an OpenCode Go subscription connected in opencode with
/connect
Install
Install any panel with opencode plugin, which installs the npm package and adds it to your tui.json:
opencode plugin ocgo-usage-tui --global
opencode plugin oc-session-context --global
opencode plugin oc-model-speed --global
Restart opencode; each panel appears in the sidebar.
Configure
Each panel has a few settings at the top of its source file. See the panel's own README for the options:
Development
This is a bun workspace; the packages live in packages/.
bun install
There is no build step: each plugin ships as a single .tsx file that opencode loads directly. The workspace devDependencies exist only so editors resolve the plugin API types.
To run a panel from a local checkout instead of the published package, point tui.json at its folder:
{
"$schema": "https://opencode.ai/tui.json",
"plugin": ["/absolute/path/to/opencode-sidebars/packages/ocgo-usage-tui"]
}
~ is not expanded here, so use an absolute path.
Publishing
Releases are published to npm by .github/workflows/publish.yml when a v* tag is pushed. Each package is published only if its version is not already on the registry, so bump the version of the package(s) you changed before tagging.
License
MIT
同类生态推荐
Tps
opencode-tps-plugin
Real-time AI generation speed and token throughput monitor for OpenCode
Context Usage
opencode-context-usage
OpenCode TUI plugin: a /context command with the exact token breakdown behind the built-in Context panel (last request) plus session-wide usage, subagent totals, cache hit rate and cost.
Supercode Updater
@glaicer/supercode-plugin-updater
OpenCode V2 TUI plugin: check and update server plugins and TUI packages, with update info for managed tools