Repository navigation
Replies: 1 comment
|
The diagnostic already names the remedy that works in this profile, so I would narrow the report to the ordering rather than the missing advice. // packages/llm/llm-deepseek-api-key/src/index.ts:30-34
throw new LlmError(
`llm-deepseek: no API key for provider route "${PROVIDER}"; store ${ref} through the credentials`
+ ` service (the web Models page writes it), or export ${ref} in the launching environment`,
'MISSING_CREDENTIAL',
)The third clause — export it in the launching environment — is exactly what headless needs, and it is already there. Your summary keeps only the first two, which makes the message look worse than it is. What is actually wrong is that the message does not depend on which plane it is on. The resolver above already branches on it: // :22-29
const credentials = ctx.get('credentials')
if (credentials !== undefined) {
const hit = await credentials.resolve(ref)
if (hit !== undefined) return assertUsableApiKey(hit.value, 'llm-deepseek', ref)
} else {
const ambient = launchEnvironmentOf(ctx).get(ref)
if (ambient !== undefined && ambient.value.length > 0) return assertUsableApiKey(ambient.value, 'llm-deepseek', ref)
}So the code knows whether the credentials service exists; the error text does not. In headless it leads with a service that is not mounted, and a user follows the first instruction into the same failure. The fix is to build the text from that same fact: when I checked this at |
Uh oh!
There was an error while loading. Please reload this page.
Summary
The shipped
headlessprofile correctly ignores saved credentials, but itsMISSING_CREDENTIALdiagnostic tells users to storeDEEPSEEK_API_KEYthrough the credentials service or Web Models page. That suggestion cannot fix this profile without restoring the disabled authentication services. A key can already be saved and the diagnostic still recommends saving it. This report concerns the recovery advice, not the intentional credential precedence.Steps to reproduce
With the released CLI on
PATH, run the following from a disposable workspace. All key values below are fake; no external model call is required.There is no
DEEPSEEK_API_KEYin the child environment and neither.envfile exists. The credential file has the sameversion/refsstructure used by the local credentials service. The failure occurs before contacting the configured endpoint.Expected behavior
The missing-key diagnostic should give recovery advice applicable to the active profile. For shipped headless, saving a key in the Web Models page alone cannot authenticate the invocation. The headless Credentials documentation describes launch environment → invocation-directory
.env→ Harness-home.env, and a three-row patch to restore stored authentication. Recovery advice should remain valid for SDK and ACP, where the store is active.Actual behavior
The invocation exits 1, with stderr:
Its NDJSON
turn_endhasreason.kind: "error"anderror.code: "MISSING_CREDENTIAL"; the final text is empty. The diagnostic neither qualifies the store suggestion nor mentions the.envfallbacks or restoration option.In isolated loopback-mock controls, stored-only headless sent no request. Separate headless runs using an exported fake key, an invocation-directory
.env, a Harness-home.env, or the documented three-row restoration patch completed withMOCK_OK; the mock received the corresponding fake key. SDK and ACP runs with only the stored fake key also completed. With no stored or launch-time key, SDK and ACP surfaced the same provider message; their store recommendation is applicable because their store is active.Evidence
The headless patch disables
credentials,authorization, anddeepseek-account. In the API-key provider,resolveApiKeyalready checksctx.get('credentials')to choose its lookup path, then throws the same store-oriented message after either path fails. These locators explain the observed scope without prescribing a repair.Runtime or environment
@deepseek-ai/dsh@0.2.1-rc.2, current npmlatestandnext, installed into an isolated temporary prefix.master, commit687f282e8625c6b8d11ff58211a90524be2e4317, also the release tag's source revision; the diagnostic and shipped-profile configuration remain present there.v26.12.0.27.0.0.Restoration check
Repeat stored-only shipped headless: it should still refuse authentication, but its error must no longer imply that saving the key alone will fix that invocation. Following a recovery option it advertises must use a credential source active in that composition. Keep a store-enabled SDK or ACP control to confirm that valid store guidance remains available where appropriate, and retain an environment-key headless control so a successful request cannot mask an unintended change to the documented authentication behavior.
Triage assessment
.envlocation, and restoration of the three authentication rows all completed against the loopback mock. The existing export suggestion is usable for shipped headless.All reactions