Deepseek Peak
OpenCode 2 TUI plugin showing DeepSeek API peak/off-peak pricing hours.
0
0
20.0
生态多维模型
1 天前
2026-10-19
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@and7ey/opencode-deepseek-peak@1.0.2"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@and7ey/opencode-deepseek-peak@1.0.2"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D @and7ey/opencode-deepseek-peakOpenCode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
An OpenCode 2 TUI plugin that shows whether the current DeepSeek API time is PEAK or OFF-PEAK, next to the prompt. During peak it renders in red.
The banner appears only while the selected provider is the native deepseek provider; switch to
another provider (including opencode-go/deepseek-* or openrouter/deepseek/*) and it disappears.
DS PEAK | LOCAL 10:40 CEST | next 12:00 CEST
PEAK is shown in the theme's error colour; OFF-PEAK is muted.
The schedule is calculated locally from UTC. No API request or credentials are needed.
Schedule
According to the official DeepSeek API pricing page, peak pricing is:
01:00–04:00 UTC06:00–10:00 UTC
The intervals are half-open: 01:00 is peak, 04:00 is off-peak, 06:00 is peak, and 10:00 is off-peak. Peak runs Monday–Friday only; weekends are entirely off-peak.
The displayed clock uses the computer's system timezone, including automatic daylight-saving changes. The timezone abbreviation is shown after the local time (for example, CET, CEST, or PST).
Install
Add the plugin to your global CLI config (~/.config/opencode/cli.json), not opencode.json:
{
"$schema": "https://opencode.ai/v2/cli.json",
"plugins": ["@and7ey/opencode-deepseek-peak"]
}
OpenCode installs npm plugins with Bun on startup. Restart OpenCode after changing cli.json.
From a local checkout
git clone https://github.com/and7ey/opencode-deepseek-peak.git
cd opencode-deepseek-peak
npm install
{
"$schema": "https://opencode.ai/v2/cli.json",
"plugins": ["/absolute/path/to/opencode-deepseek-peak"]
}
Options
{
"$schema": "https://opencode.ai/v2/cli.json",
"plugins": [
{
"package": "@and7ey/opencode-deepseek-peak",
"options": { "slot": "prompt.footer.status" }
}
]
}
| Option | Default | Meaning |
|---|---|---|
slot |
prompt.footer.status |
V2 prompt slot to append the banner to. |
prompt.footer.status is the status area of the prompt footer. Other V2 slots you can try:
prompt.footer, prompt.footer.file, session.composer.top.
Development
npm test
The pure logic in deepseek-peak-status.mjs (peak windows, local-time formatting, next transition,
clock) is covered by deepseek-peak-status.test.mjs using node --test.
opencode-deepseek-peak-tui.mjs is the V2 CLI plugin entrypoint and is only exercised inside OpenCode.
Credits
A port of kolodziejm/opencode-deepseek-pricing to the OpenCode 2 plugin API. MIT.
License
同类生态推荐
Deepseek Peak
opencode-deepseek-peak
OpenCode V2 plugin showing DeepSeek peak and off-peak pricing periods
Ds Peak
opencode-ds-peak
Minimal opencode TUI sidebar dot showing whether DeepSeek is in peak or off-peak pricing, with a countdown to the next switch. Five languages.
Peak Badge
opencode-peak-badge
OpenCode TUI plugin: live [PEAK]/[OFF-PEAK] badge for any model with configured peak hours. Provider-agnostic; ships with DeepSeek defaults.