dsh-llm-sampling-params

Injects per-model sampling parameters into chat-completions requests to OpenAI-compatible gateways: a fetch wrapper looks the request body's model id up in a configured models table and sets temperature, top_p, top_k, min_p, repeat_penalty, presence_penalty and frequency_penalty on requests whose URL carries /v1/chat/completions, plus repetition_penalty for SGLang and vLLM.

Overview

Injects per-model sampling parameters into chat-completions requests to OpenAI-compatible gateways: a fetch wrapper looks the request body's model id up in a configured models table and sets temperature, top_p, top_k, min_p, repeat_penalty, presence_penalty and frequency_penalty on requests whose URL carries /v1/chat/completions, plus repetition_penalty for SGLang and vLLM.

Installation

Install from npm

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

Resolves a published tarball rather than cloning the repository, and installs without any extra setup. Swap `web` for your profile name if you run another one.

Install from GitHub

dsh plugin --profile web add github:devhang/dsh-llm-sampling-params

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.