Verdict: all four patch layers can change built-in parameters, but config replaces the whole block instead of merging downward; miss one required field and --dump-config still passes while the real run exits after 1.5 seconds.
Previous pieces covered installation, task performance, headless mode and session records. This one touches a single thing: how to change built-in parameters, and what happens when you get it wrong.
What I tested
Environment: WSL2 (Ubuntu), Node 22.23.2, dsh 0.2.0-rc.2. To keep my daily setup untouched I copied the whole ~/.dsh into /tmp/dsh_20261030/home1, pointed DSH_HOME at it, and wrapped every command in timeout 280.
First, the size of the thing: dsh --profile headless --dump-config prints 96 plugin entries and 379 lines of YAML. There are four override layers:
| Layer | Location |
|---|---|
| bundle | dsh.profile.bundles in package.json lists dsh-base plus dsh-headless |
| profile | $DSH_HOME/profiles/<name>/cordis.patch.yml |
| home | $DSH_HOME/cordis.patch.yml, one file shared by all profiles |
| CLI | --patch some.yml |
Creating your own profile takes one command: dsh probe --from-default-profile headless. It starts up immediately, and the headless template exits with exit 1 because no task was given — but the four files are already copied into profiles/probe/, so you can use them anyway.
Five test rounds, all aimed at the same built-in entry, agent-default-model, whose defaults are provider: deepseek-official and model: deepseek-flash.
| # | Patch | Result |
|---|---|---|
| 1 | set only model, not provider | --dump-config exits 0 and still prints the tree; the real run exits 1 after 1.5s with ValidationError: invalid config: $.provider missing required value |
| 2 | all three fields plus maxTokens: 8000 on llm-deepseek | exit 0 in 6.1s; request headers become model: deepseek-v4-pro, reasoningEffort: low, maxTokens: 8000 |
| 3 | misspell the id as agent-default-modell | one stderr line, patch: entry "agent-default-modell" not found, then it runs anyway: exit 0 in 3.3s with headers still deepseek-flash / 256000 / high |
| 4 | no profile at all, one-off --patch layer | exit 0 in 7.1s; model changed, maxTokens still 256000 |
| 5 | same question, reasoningEffort set to off vs high | both exit 0; 2.52s vs 2.56s, both answered 70%; the difference shows in stderr reasoning text, 0 B vs 67 B |
Round 5 is the one I most wanted to make work: a single line, reasoningEffort: off, turns reasoning off. On simple arithmetic there is no visible difference — both runs take about two and a half seconds. What differs is stderr: high adds 67 bytes of thinking text, off leaves none. Whether that actually saves anything would need a real task; I did not test that here.
To confirm a change really landed, don't guess — the zstd session file on disk records the final request headers.
zstd -dc ~/.dsh/sessions/--tmp-xxx--/session-*/session.v4.jsonl.zstd | grep request/header
It decodes to "config":{"provider":"deepseek-official","model":"deepseek-v4-pro","reasoningEffort":"low","maxTokens":8000}, matching the patch field by field. I used this file for token accounting in the previous three pieces; here it verifies configuration.
Layer order is tested too: write deepseek-flash in the profile layer and deepseek-v4-pro in the CLI layer, and you get deepseek-v4-pro. Later layers override earlier ones; get the order backwards and nothing errors, it simply has no effect. The cordis.patch.yml in the home layer works globally the same way — drop it at the root of $DSH_HOME.
One trap: config is replaced wholesale, and dump won't stop you
Symptom: you only want to switch models, so the patch sets one line, model:. --dump-config shows that entry with the new model and looks perfectly fine. The real run exits before the task even starts: 1 required plugin did not activate, followed by $.provider missing required value, and then a line about headless-runner (required) agent — the upstream plugin never came up, so everything downstream fails with it.
Reproduce:
cat > $DSH_HOME/profiles/probe/cordis.patch.yml <<'EOF'
- id: agent-default-model
config:
model: deepseek-v4-pro
EOF
dsh --profile probe --dump-config # exit 0, looks fine
dsh --profile probe "answer with one word" # exit 1, 1.5s
Fix: when you copy that entry, write the required fields in full — config replaces the block, it does not merge with the original. If you are unsure which fields are required, check the JSON Schema from dsh --profile <name> --dump-config-schema; every entry carries required, and agent-default-model needs both provider and model. When you are done, don't trust dump alone: run a one-line task to prove it works, then read the request headers out of the session file. Two minutes saves you a wasted afternoon.
One more note on the misspelled id: it is warned and skipped, with a single line on stderr mixed into the reasoning text, so it is easy to dismiss as noise.
Verdict
4 / 5, judged solely on "can configuration be changed, and can the change be verified". Four override layers, one YAML per layer, and the result readable back from the persisted request headers — that is enough for scripting and troubleshooting. Points come off because wholesale replacement is not obvious, and --dump-config does not validate required fields: get it wrong and you only get a warning, not a stop.
Test environment: WSL2 (Ubuntu), Node 22.23.2, dsh 0.2.0-rc.2. Commands, exit codes, timings and request headers are all measured on this machine.
By Cheng Shi
广告

