Adds a /copilot-multipliers slash command to OpenCode that shows GitHub Copilot model multipliers.
- Fetches model multipliers from GitHub Docs
- Caches results locally for 7 days
- Falls back to stale cache if refresh fails
- Displays multipliers in a clean dialog within OpenCode
npm install opencode-copilot-multipliersThen add to your tui.json:
{
"$schema": "https://opencode.ai/tui.json",
"plugin": [["opencode-copilot-multipliers", { "forceRefresh": false }]]
}- Clone and build:
git clone https://github.com/quinus/opencode-copilot-multipliers.git
cd opencode-copilot-multipliers
npm install
npm run build- Register in your
tui.json:
{
"$schema": "https://opencode.ai/tui.json",
"plugin": [["./dist/plugin.js", { "forceRefresh": false }]]
}In OpenCode, run:
/copilot-multipliers
This displays a dialog showing the current GitHub Copilot model multipliers.
| Option | Type | Default | Description |
|---|---|---|---|
cacheDir |
string | .opencode/cache/ |
Custom cache directory path |
forceRefresh |
boolean | false |
Bypass weekly cache and fetch fresh data |
The plugin stores cache files in .opencode/cache/ (or custom directory if specified):
copilot-multipliers.md- Markdown table with model multiplierscopilot-multipliers.meta.json- Metadata (last fetch time, cache status)
- First run: Fetches multipliers from GitHub Docs and caches locally
- Subsequent runs: Uses cached data if younger than 7 days
- Stale cache (> 7 days): Automatically refreshes from GitHub Docs
- Fetch error: Falls back to stale cache with warning toast
# Install dependencies
npm install
# Build TypeScript
npm run build
# Type check
npm run check
# Lint
npm run lint
# Format
npm run formatMIT © Quinten Schelfhout