log-li/dsh-peakrate1

dsh-peakrate

Peak / off-peak rate badges and switch countdown for DeepSeek Harness — per provider, per model, in the model selector and the composer tool row. Judges each provider by its own time zone and schedule instead of DeepSeek-only hours.

包名
dsh-peakrate
版本
0.2.2
许可证
MIT
最近更新
2026年9月12日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:log-li/dsh-peakrate

Configuration

Configuration lives in the profile's cordis.patch.yml:

- id: peakrate
  config:
    # provider id → catalog provider name
    providerAliases:
      my-gateway: DeepSeek
    # provider-scoped model patterns; first match wins
    modelMappings:
      - provider: my-gateway
        match: "^deepseek-v4"
        profile: deepseek-v4
      - provider: my-gateway
        match: "glm-5\\.3-flash"
        matchIsRegex: true
        profile: zai-glm-5-3-flash
    # fetch interval; 0 disables the background refresh
    refreshIntervalHours: 24
    catalogUrl: https://offpeakclock.com/pricing.json
    cachePath: ~/.dsh/peakrate/pricing.json
OptionDefaultDescription
enabledtrueBackground refresh switch. Also editable in the coverage panel.
refreshIntervalHours24Hours between catalog refreshes. 0 disables it. Also editable in the panel.
catalogUrlthe public catalogRemote catalog URL.
cachePath~/.dsh/peakrate/pricing.jsonOn-disk cache of the last successful fetch.
providerAliasesbuilt-in tableExtra provider id → catalog provider mappings. Yours win over the built-ins.
modelMappingsbuilt-in tableExtra provider + model pattern → profile mappings. Yours are tried first.
customProfiles[]Additional profiles: override a bundled entry by id, or add a new one. They take part in badge judgement too.

modelMappings entries are prefix matches by default; set matchIsRegex: true for a regular expression. Invalid regexes do not throw — they simply never match.

customProfiles fully applies, badges included. The host serves its merged catalog over /peakrate/catalog, so a custom profile takes part in badge judgement exactly like a bundled one — either overriding a bundled entry by id, or adding a new one. Verified: pointing deepseek-v4 at a custom profile with peak: 9× changes both the served catalog and the badge to .