devhang/dsh-llm-sampling-params

Stamps per-alias sampling parameters onto chat-completions requests, so one loaded model can serve several temperature roles.

Sends the sampling parameters DSH has no field for: top_p, top_k, min_p, repeat_penalty, presence_penalty and frequency_penalty, which OpenAI-compatible gateways accept per request while LlmCallConfig carries only temperature, max tokens and stop. The mechanism is a globalThis.fetch wrapper, and the README justifies going that low: agent-loop requests arrive deep-frozen so mutation throws, and the pi-ai adapter does not forward onPayload, so editing the already-built JSON body before it leaves the process is the only place that touches no harness internal. The useful side effect is role switching by alias — one loaded model served under several names costs no extra VRAM, so switching the alias switches the sampling profile.

Models & Providers ★ 0 updated 2026-10-01
View on GitHub ↗

Install

dsh plugin --profile web add dsh-llm-sampling-params

The npm line, which the README heads with "once published" although the registry serves 0.2.1 with a repository field matching this repo — stale wording rather than a missing release. Then restart dsh web or refresh the GUI page. Where the models table goes depends on the harness line: on 0.2.x it is a top-level sampling-params entry in the profile's cordis.patch.yml (edit the patch file, not cordis.yml), and on 0.1.x it is a sampling-params: section in $DSH_HOME/settings.yaml.

Compatibility

Upgrading to dsh 0.2.x renames settings.yaml to settings.yaml.imported, a frozen backup the harness no longer reads, so a 0.1.x models table strands there — the README gives the migration by hand, re-indented by two spaces under config:, and warns that the one-time auto-import does not re-run. Each alias must carry a complete sampling set of all seven numbers. The plugin never hardcodes an LLM port and only touches requests whose URL contains /v1/chat/completions, so unconfigured aliases pass through untouched.

Details

Alternatives

drscrewdriver/dsh-llm-openai-completions · elves-ai/dsh-llm-nowcoding · wenzetan/dsh-llm-newapi

More plugins in Models & Providers

Browse more in Models & Providers

Guides for Models & Providers plugins