Real-time LLM inference metrics visualization for OpenCode.
Designed for AI researchers and developers using self-hosted inference servers. See generation speed and progress in real-time while waiting for LLM responses in OpenCode.
This plugin works with llama-swap-pulse, a companion server that:
- Reads logs from your llama-swap instance
- Exposes metrics via HTTP API and Server-Sent Events (SSE)
- Provides real-time inference data in a plugin-friendly format
The plugin automatically connects to the pulse server based on your provider's baseURL configuration.
Add to your ~/.config/opencode/tui.json:
From npm:
{
"plugin": [
["oc-pulse", { "port": 8090, "debug": true }]
]
}From local file:
{
"plugin": [
["file:///path/to/oc-pulse", { "port": 8090, "debug": true }]
]
}| Option | Type | Default | Description |
|---|---|---|---|
port |
number |
8090 |
Pulse server port. If omitted, defaults to 8090. |
- Reads the current session's provider
baseURLautomatically - Strips path components (e.g.
/v1,/openai) and uses host + port - Displays LLM metrics in the session prompt area
- Automatically reconnects when switching providers
Live metrics are displayed in the right side of the session prompt:
- Progress percentage
- Processing speed (tokens/sec)
- Number of prompt tokens
- Generation speed (tokens/sec)
- Number of tokens generated
- Total duration
- Total tokens (prompt + generated)
- Graph cache reuse count (when available)
- Model restoration similarity score (when restoring cached context)
Status indicators:
◯— Connected but no task running✕— Pulse server running but disconnected from llama-swap(empty)— Inactive (no session or no baseURL)
-
OpenCode >= 1.14.31
-
A provider with a
baseURLconfigured (e.g., a llama-swap instance) -
llama-swap-pulse running on your llama-swap server
Install and configure: https://github.com/LeBohdan/llama-swap-pulse
Providers without baseURL (e.g., OpenRouter, API-key providers) will show inactive state.
(c) Bohdan Futerko, 2026, https://www.bf.com.ua, https://github.com/LeBohdan