rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:lavandiI/dsh-peak-opencode
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English · Русский

The band above the composer in DeepSeek Harness shows the current model's tariff and its price:
On the left of the band is the current tariff's price per 1M tokens (input · output · cache, plus write when the model bills cache writes); on the right are the phase, the period end in your time zone and the time left. The band's fill shows how much of the period remains; flat and free tariffs are filled solid.
Works for all OpenCode Go models. The model catalog, prices and multiplier rules are fetched from opencode.ai on DSH startup and cached; models with peak hours (DeepSeek V4.1 Flash and V4 Pro) are calculated from the catalog windows, models with a date multiplier (Gemini 4 Argon) by date, free models get the green “Free tariff” band, and the rest get the blue “Flat tariff”.
For a DeepSeek account (deepseek-account/deepseek-flash is V4.1 Flash 1017, as well as deepseek-v4-pro) prices and peak windows also work: they match DeepSeek's official price list and do not depend on the Go catalog.
Source: the public https://opencode.ai/inference/go/v1/models (no API key required).
/dsh-peak-opencode/models. The response is versioned; if an old host is running (after a plugin update without restarting DSH), the client rejects its response and takes the public catalog directly.localStorage, so a page refresh paints the band immediately without waiting for the network.DeepSeek peak hours from the catalog: Mon–Fri 01:00–04:00 and 06:00–10:00 UTC (09:00–12:00 and 14:00–18:00 Beijing time, 04:00–07:00 and 09:00–13:00 Minsk time), multiplier ×2. Everything else is off-peak. China's 2026 holidays are built in; moved working Saturdays and Sundays are ignored — DeepSeek looks only at weekdays, weekends and holidays.
Models without multipliers (GLM, Kimi, Qwen, MiniMax, GPT, Claude, Grok and the rest of Go) are shown with the blue “Flat tariff” band: their price is constant. Free models (beam-free, iceman-contributor-free, longcat-2.5-free, and renamed ones such as longcat-2.5-preview-free) get the green “Free tariff” band: zero price, no peak or off-peak periods. Models with a ×2 multiplier are counted as off-peak while the multiplier is inactive: for DeepSeek it turns on by clock (windows above), for Gemini 4 Argon by date 2026-12-01; before it the band is green, after it pink with the ×2 price.
input $0.30 · output $1.20 · cache $0.006 / 1M at peak, input $0.15 · output $0.60 · cache $0.003 / 1M off-peak, and the base price for the flat tariff. Cache writes, when the model bills them, appear as write $… after cache. Free models get the green band with the label free: it does not depend on the model's id in the Go catalog. When the provider renames a free model (longcat-2.5-preview-free in DSH vs longcat-2.5-free in the catalog), the price is still known from the -free suffix; and a free model never inherits a paid catalog entry even if the id matches after stripping the suffix (step-5-preview-free and step-5-preview).Off-peak tariff · until 13:00 · 3 hr 49 min.Flat tariff · no peak hours on the right. There is no progress or timer because there is no period.Free tariff · no peak hours on the right and free on the left. There is no timer either: the price does not depend on time.Off-peak tariff · until Dec 1 · 21 days, after it Peak tariff · from Dec 1 with the multiplied price.Plugins → OpenCode Go cost/peak (open the plugin card — settings are shown right on its page, the plugins.bundle.config slot):
The plugin has no themes: colors are fixed (green, pink, blue; free models use the same green). If you need other shades, override --pc-c-valley, --pc-c-peak, --pc-c-flat, --pc-c-free through “Custom CSS”.
| Selector / variable | What it does |
|---|---|
:root{--pc-c-valley / --pc-c-peak / --pc-c-flat / --pc-c-free} |
colors of the off-peak, peak, flat and free tariff; they also set the card outline |
.pc-bar{--pc-band / --pc-tuck / --pc-lift} |
visible height, depth under the card, text lift |
.pc-bar[data-hero]{--pc-hero-radius} |
top corners on the first screen |
.pc-bar[data-phase="peak"], [data-phase="valley"], [data-phase="flat"], [data-phase="free"] |
styles for a single phase |
--pc-pct |
remaining period percentage (100% for flat and free tariffs) |
.pc-bar[data-hero-price] |
second price row on the first screen: --pc-hero-price-line (its height), top and the left inset |
.pc-price |
the tariff price on the left; on the first screen the band's second row under the chips, hidden on narrow windows |
.pc-phase, .pc-until, .pc-left |
phase, period end and time-left labels |
:root{ --pc-c-valley:#c8ecd8; --pc-c-peak:#ffb3ab; --pc-c-flat:#c7dcf5; --pc-c-free:#c8ecd8 }
.pc-bar[data-hero]{ --pc-hero-radius:20px }
.pc-left{ font-weight:600 }
The plugin is translated into every language DSH officially supports: English, Chinese, Japanese, Spanish, French, German, Russian and Portuguese.
locale/<language>.json points meta.detail at its own detail/<language>.md. Without it DSH would show the same README.md in every language.Intl for the DSH language (5 ч 30 мин, 5 hr 30 min, 5時間30分) instead of hand-built strings.locale service is unavailable, the plugin uses <html lang> or the browser language; an unknown language falls back to English.title, description) is provided in locale/ for all eight languages.Published: dsh-peak-opencode@0.4.4 — the current version in the repository.
dsh-peak-opencodedsh plugin --profile desktop add dsh-peak-opencodeDSH adds the package to the profile (dsh.profile.bundles), applies cordis.patch.yml and serves the client half at /plugins/dsh-peak-opencode/client.js. After installation, restart DSH (the host half is needed) and refresh the Web GUI page.
The plugin can be installed as a local bundle:
plugin_manager action=install_bundle target=<path-to-plugin>
or from the GUI: Settings → Plugins → Install and the plugin folder path. After installation, refresh the Web GUI page (Ctrl+R / F5).
The client half is picked up by a page refresh. The host half (the catalog route) loads on DSH startup: after changing it, restart the app. Before the restart the plugin falls back to fetching the public catalog directly, so the band does not disappear.
See PUBLISHING.md for publishing the package for everyone.
×2 multiplier bound to a date (from 2026-12-01), not to hours: the model has no hourly windows, so before that date it is off-peak and after it peak. There is no progress within the period; the fill is solid.-free suffix in the id. So free is shown even when Go renamed the model and the catalog found no exact match.opencode-go) the Go catalog does not apply: DeepSeek is calculated by the built-in rules, and other models get the blue band only with “Show for models outside the Go catalog” enabled.conversation.input.dock slot and the data-composer-card attribute; if the host changes the contract, the band simply stops appearing. Settings register in the plugins.bundle.config slot by package name and appear on the plugin page in Plugins; if the slot is renamed, the settings panel disappears while the band keeps working.lib/index.js — the host half: fetches the catalog on DSH startup, caches it and serves /dsh-peak-opencode/models.lib/client.js — the band, settings, catalog parsing, dictionaries for eight languages and the direct fallback request; registered through window.__ModuleLoader__.load.localStorage (dsh-peak-opencode:settings); the catalog snapshot is in dsh-peak-opencode:catalog:v3.locale/<language>.json — title, short description and meta.detail; detail/<language>.md — the long description DSH shows on the plugin page.conversation.input.dock (order: 60) for the band and plugins.bundle.config (key: dsh-peak-opencode) for the settings panel on the plugin page.npm test checks syntax, renders the band and settings against a React stub (blue and green bands, all languages, “same as DSH” mode) and the host catalog route on the real endpoint format.Issues and pull requests are welcome. See CONTRIBUTING.md for the development workflow and CODE_OF_CONDUCT.md for community expectations.
Please report vulnerabilities privately through the repository's Security tab; see SECURITY.md.
MIT © lavandil
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek、deepseek-harness。