Skip to content
MyDSHMy DSH Field Notes
中文
Independently maintained; not affiliated with DeepSeek. No association with mydsh.dev or other MyDSH sites.

Home/Developers & plugin dev/Dev setup & scaffolding

Where credentials come from: the error message already tells you

A new DSH_HOME or a new machine, and the first run says there is no key, with no clue where to put one.

VerifiedVersion and environmentChecked 2026-11-14
Host
0.1.2-alpha.5
Scenario
isolated DSH_HOME, i.e. a fresh environment
Checked
2026-11-14

Copyable command

export DEEPSEEK_API_KEY=sk-... && dsh --profile headless "task"

Running headless under a brand-new DSH_HOME reports this verbatim:

dsh: MISSING_CREDENTIAL: llm-deepseek: no API key for provider route "deepseek-official";
store DEEPSEEK_API_KEY through the credentials service (the web Models page writes it),
or export DEEPSEEK_API_KEY in the launching environment

That single line carries a lot

What it saysMaps to
What is missingNo API key for provider route "deepseek-official"
Where it livesThe credentials service, which the web Models page writes
Two ways to supply it(1) through the credentials service; (2) export DEEPSEEK_API_KEY in the launching environment

The second route works as measured

export DEEPSEEK_API_KEY=sk-...
dsh --profile headless "your task"

With only the environment variable set, headless ran correctly under an isolated DSH_HOME (it returned the right answer) without any credential file pre-written. That matters for CI and throwaway environments.

What the credential file looks like

version: 1
refs:
  DEEPSEEK_API_KEY: sk-...
records:
  client-connection/browser-session:
    kind: grant

Three top-level keys: version, refs (the secrets), and records (authorisation records such as browser sessions). Switching DSH_HOME switches the entire credential and authorisation set, which is why isolated experiments must bring their own key.

This is also where isolated experiments most often stall: point DSH_HOME at a temp directory and the old key and grants are simply not there. Nothing is broken; the environment changed.

What counts as working

Check every line. All of them pass or the job is not done.

  • You can name both routes the MISSING_CREDENTIAL error gives
  • You know switching DSH_HOME switches credentials too
  • CI prefers the environment variable over writing a file

Where it fails

Symptom, cause, what to do — written in the order it actually happens.

SymptomCauseWhat to do
Still no key after setting the variableWrong name, or not in the booting process's environmentConfirm it is DEEPSEEK_API_KEY in the same process; check with printenv
Everything needs reconfiguring after changing DSH_HOMECredentials and grants follow DSH_HOMEExpected; supply a key explicitly for isolated experiments

Sources

Verified means measured here. Compiled means every line carries a source.