Fix DSH provider auth status: env fallback and saved keys
The green, yellow, and unconfirmed hints on the DeepSeek Harness model page are about detection, not correctness. Green means the listed environment variable exists, yellow means none was found, and unconfirmed means the read failed. None of them validates the key or tests the connection. Treating a green hint as “connected” leads straight into MISSING_CREDENTIAL or 401 at request time.
DeepSeek Harness: What the three states mean
Triage by hint first, then choose between adding a variable, re-entering a key, or fixing a read failure. Compare:(source)
| Hint | Meaning | First action |
|---|---|---|
| Green | A listed environment variable was found | Verify the value is valid |
| Yellow | No credential variable was found | Enter a key or configure the variable |
| Unconfirmed | Credential status could not be read | Check file access, profile, and environment |
Green is not “passed”. The official docs say detection does not validate credentials or test connections. An empty, expired, or wrong-project key can still be green.
Yellow is not always “not configured”. If the provider uses a saved credential, the placeholder says “leave blank to use saved credential” and no status text appears. Only environment fallback shows a detection hint. Read the placeholder before the color.
DeepSeek Harness: Saved credentials and environment fallback
The same input box can mean two different paths when empty: a saved credential or an environment variable. Tell them apart:(source)
- Read the placeholder — “leave blank to use saved credential” means a stored value exists; “leave blank to use environment auth” means fallback. Expected: know what an empty field does.
- Read the hint below — environment fallback shows detection text when empty; saved credentials do not. Expected: do not confuse “no hint” with “not configured”.
- Enter a value — both status texts disappear and the input is used. Expected: after saving, the page only receives a redacted descriptor, never the plaintext.
Keys are write-only. After saving, the page does not receive the plaintext again; the eye button only reveals the current input. The saved value stays write-only.
DeepSeek Harness: Three common misreads
Auth is confusing because “configured” and “usable” are separated by three layers. Three misreads:(source)
- Green means usable — the variable may be empty, expired, or belong to another project. Expected: send a real request instead of trusting the color.
- Yellow means unconfigured — a saved credential may be in use, or the variable name is not in the detection list. Expected: read the placeholder and
apiKeyEnv. - No key field means broken — providers such as
openai-codexhave no native key auth and show no field unless the profile specifies a credential reference. Expected: inspect the profile.
A fourth case: AWS profiles and Google application default credentials are provider-managed files outside the check. They may work without a green hint, and a green hint does not prove they were checked.
DeepSeek Harness: A minimal config comparison
To check environment fallback, compare apiKeyEnv in the profile with the startup environment. Example:(source)
- id: llm-pi-ai
config:
providers:
my-gateway:
apiKeyEnv: GATEWAY_API_KEY
api: openai-completions
baseURL: https://gateway.example/v1
If this says GATEWAY_API_KEY but the shell exports GATEWAY_KEY, detection is yellow and the request reports MISSING_CREDENTIAL. Variable names match exactly, not fuzzily.
DeepSeek Harness: Troubleshooting order
Check page → environment → file → request; do not start by rewriting configuration. Steps:(source)
- Confirm the provider on the model page — check the provider ID and model name. Expected: the key was not entered for another provider.
- Read the placeholder — decide whether the current path is saved credential or environment fallback. Expected: know whether to check a file or an environment variable.
- Check the startup environment —
env | grep -i <variable>. Expected: it exists and is non-empty in the process that started dsh. - Send a real request — one minimal message with the current model. Expected: success,
MISSING_CREDENTIAL, 401, or another error.
If it is MISSING_CREDENTIAL, re-enter the key or fix the apiKeyEnv variable. If it is 401, the credential was read but rejected; check ownership and permissions instead of hunting for detection.
DeepSeek Harness: Three credential sources
Saved credential, environment variable, and profile credential reference suit different setups. Compare:(source)
- Saved credential — convenient on a personal machine; the UI writes
.credentials.yaml. Cost: plaintext sensitive file; do not commit it. - Environment variable — fits containers and CI. Cost: the name must match
apiKeyEnvand be visible in the startup environment. - Profile credential reference — explicit control for providers that need it. Cost: more configuration to inspect.
A practical rule: use one source per provider. If you save a key and also export a variable, diagnosing which one won becomes guesswork.
Error-to-cause table
The same “auth failure” can mean different things; match the error and hint before acting. Reference:
| Symptom | More likely cause | Direction |
|---|---|---|
Yellow + MISSING_CREDENTIAL | No usable credential | Enter a key or variable |
Green + MISSING_CREDENTIAL | Variable empty or wrong name | Check startup environment and apiKeyEnv |
| Green + 401 | Credential read but rejected | Check ownership, quota, permissions |
| Unconfirmed + request failure | Credential status read failed | Check file access, profile, home |
| No key field | Provider has no native key auth | Check profile credential reference |
If the same provider behaves differently on two machines, compare their startup environments and DSH_HOME before comparing screenshots. “Sometimes works” is often two different credential sources.
DeepSeek Harness FAQ
Green hint but 401—is this a DSH bug? No. 401 means the server rejected a credential that was read. Check key ownership, quota, and provider configuration.
Do I need to restart after editing .credentials.yaml? Do not edit it by hand. Save through the UI so settings and the credential reference stay consistent; model changes apply on the next request.
Why did auth break after switching profiles?
Credentials are tied to profile configuration. The new profile may point at a different apiKeyEnv or credential reference; confirm on that profile’s model page.
The short version: the hint answers “what was detected”, not “what works”. Green → check the request, yellow → check the placeholder, unconfirmed → check the read path.
FAQ
DeepSeek Harness: green means a listed environment variable was detected. Yellow means no credential variable was detected, so enter a key or configure the variable. Unconfirmed means the read failed. None of them validates the key or tests the connection.
DeepSeek Harness: detection only proves a variable exists, not that its value works. An empty value, a different profile, or a mismatch with apiKeyEnv still produces MISSING_CREDENTIAL. Re-enter the key or verify the variable in the startup environment.
DeepSeek Harness: the first means a saved credential exists and will be reused; no status text appears. The second means environment fallback, and a detection hint appears when the field is empty. A non-empty input overrides both placeholders.
DeepSeek Harness: provider-managed credential files are outside the check. The model page only covers saved credentials and the listed environment variables. Configure those mechanisms according to the provider’s own documentation.
DeepSeek Harness: providers without native key authentication do not show a key field unless the profile explicitly specifies a credential reference. Check the profile credential configuration instead of looking for an input box.
Related Terms
- auth status hint
- An auth status hint is the model page’s display of credential detection: an environment variable was found, no variable was found, or the read failed. It does not validate the credential or test the connection.— DeepSeek Harness docs - Configure models
- MISSING_CREDENTIAL
- MISSING_CREDENTIAL is the DeepSeek Harness error for “no usable credential at request time”. Common causes include an unsaved key, a missing apiKeyEnv variable, or a change written to another profile.— DeepSeek Harness docs - Configure models
- apiKeyEnv
- apiKeyEnv names the environment variable a provider reads when no saved credential exists. A wrong name or a variable absent from the startup environment makes the credential unavailable.— DeepSeek Harness docs - Configure models
- .credentials.yaml
- .credentials.yaml is the user-level DeepSeek Harness credential file under $DSH_HOME. It stores provider keys and the browser session signing key and is a plaintext sensitive file.— DeepSeek Harness docs - Configure models
Sources
- DeepSeek Harness docs - Configure models· deepseek-ai
- DeepSeek Harness reference - Plugin configuration catalog· deepseek-ai