npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-model-scheduler

v0.1.1

Published

Searchable model picker plus automatic peak/off-peak model switching for the DeepSeek Harness Web GUI

Readme

dsh-model-scheduler

check npm license

A DeepSeek Harness plugin that adds two things to the Web UI:

  1. A searchable model picker. The composer's model selector becomes searchable by name/ID — useful when your deployment exposes many models.
  2. Peak / off-peak automatic switching. You assign one model for peak hours and another for off-peak hours; the deployment auto-switches between them at period boundaries, for every open session (next request) and new sessions (the saved default).

🇨🇳 中文说明见 README.zh.md。


How it works

  • The schedule is evaluated in Asia/Shanghai time (configurable).
  • Default schedule:
    • Peak (高峰): Monday–Friday, 09:00–12:00 and 14:00–18:00 Beijing time.
    • Off-peak (空闲): everything else — including all of Saturday and Sunday.
  • A host timer re-checks the period every 30 seconds; when the period crosses a boundary, it applies the period's model:
    • agentDefaultModel is updated (default for new sessions);
    • every attached non-subagent session receives a model/selection session event, so that session's next request uses the period model immediately.
  • Editing the schedule in the GUI applies immediately (force), not on the next tick.
  • Startup never overrides anything: the current period is only recorded as a baseline.
  • Models are validated with the deployment's LLM route resolution before being applied; an unavailable route logs a warning and is skipped.

Install

dsh plugin --profile web add github:Niobium-41-nb/dsh-model-scheduler

Restart dsh web (or reload the profile), then refresh the browser page. The built bundle is committed to this repository, so no build step is required on the user side.

Usage

  1. In the composer, a badge next to the model seat shows the current period (peak / off-peak). Click it to open the schedule panel.
  2. In the panel:
    • Search and pick models — search by model name, model ID, or provider name; two actions per row: Use now (switch this session, also becomes the new default) and Set as peak/off-peak model.
    • Peak model / Off-peak model — the two routes used by automatic switching.
    • Peak windows (time zones shown) — up to two time-of-day windows; an end at or before the start crosses midnight.
    • Peak days — weekday chips (default Mon–Fri; weekend is fully off-peak).
    • Enable switch — turns automatic switching on/off.
    • Switch to the current period model now — applies the current period's model immediately.
  3. Changes are saved to the shared model-scheduler settings namespace and take effect right away.

Configuration

The plugin works with zero configuration (defaults above). Everything is editable from the GUI, and the same namespace is available in cordis.yml:

- id: dsh-model-scheduler
  config:
    enabled: true
    timeZone: Asia/Shanghai
    peakDays: [1, 2, 3, 4, 5]        # 0=Sunday … 6=Saturday
    peakWindows:
      - { start: "09:00", end: "12:00" }
      - { start: "14:00", end: "18:00" }
    peakModel: { provider: "deepseek-official", model: "deepseek-chat" }
    offPeakModel: { provider: "deepseek-official", model: "deepseek-reasoner" }

The model-scheduler settings section (what the GUI edits) overrides this composition config.

Development

pnpm run host:test     # node --test on lib/tests (period engine + host apply behavior)
pnpm run bundle        # tsdown → lib/client.js (client half)
node scripts/verify-client.mjs  # smoke-check the client bundle contract

Layout:

  • lib/index.js — host plugin (apply), settings namespace model-scheduler, the 30 s timer, default + session-level switching.
  • lib/period.js — pure period engine (IANA time zone, weekday windows, midnight-crossing windows). Mirrored by src/client/period.ts.
  • src/client/* — browser half: searchable picker + schedule panel as a conversation.input.right slot, locale dictionaries (model.scheduler), stylesheet.
  • cordis.patch.yml — bundle manifest for dsh plugin add.

The published artifact is the committed build output (lib/client.js), so users install via git without prepare scripts or allowBuilds.

License

MIT — see LICENSE.