{"record":{"id":"0c81acdd3768a434","repo":"deepseek-ai/deepseek-harness","slug":"missing-credential","errorCode":"MISSING_CREDENTIAL","errorMessage":"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","messagePattern":"llm-deepseek: no API key for provider route \"(.+?)\"; store (.+?) through the credentials service \\(the web Models page writes it\\), or export (.+?) in the launching environment","errorType":"exception","errorClass":"LlmError","httpStatus":null,"severity":"error","filePath":"packages/llm/llm-deepseek/src/index.ts","lineNumber":427,"sourceCode":"  options()\n\n  const resolveApiKey = async (connection: ResolvedDeepSeekOptions): Promise<string> => {\n    // Every credential fact comes from the caller's snapshot, so a rejected\n    // settings generation cannot leak its key onto the previous endpoint.\n    const ref = connection.apiKeyEnv\n    const credentials = ctx.get('credentials')\n    if (credentials !== undefined) {\n      const hit = await credentials.resolve(ref)\n      if (hit !== undefined) return assertUsableApiKey(hit.value, 'llm-deepseek', ref)\n    } else {\n      // Without the seam there is no managed store to rank against, so the\n      // environment is the whole credential plane.\n      const ambient = launchEnvironmentOf(ctx).get(ref)\n      if (ambient !== undefined && ambient.value.length > 0) {\n        return assertUsableApiKey(ambient.value, 'llm-deepseek', ref)\n      }\n    }\n    throw new LlmError(\n      `llm-deepseek: no API key for provider route \"${PROVIDER}\"; store ${ref} through the credentials`\n      + ` service (the web Models page writes it), or export ${ref} in the launching environment`,\n      'MISSING_CREDENTIAL',\n    )\n  }\n\n  let userId: AnonymousUserId | undefined\n  const resolveUserId = (): AnonymousUserId => userId ??= getOrCreateAnonymousUserId()\n  const adapter = new DeepSeekAdapter({\n    options,\n    resolveApiKey,\n    resolveUserId,\n    resolveAttachments: () => ctx.get('attachments'),\n  })\n  ctx.llm.registerConfigurableProviders([\n    { provider: PROVIDER, displayName: 'DeepSeek', settingsNs: NS, settingsPath: [] },\n  ])\n  // Route effects bind to this apply fiber via the stable `ctx` reference,","sourceCodeStart":409,"sourceCodeEnd":445,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/llm/llm-deepseek/src/index.ts#L409-L445","documentation":"Error \"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\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/llm/llm-deepseek/src/index.ts:427 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Store the referenced key through the credentials service (the web Models page writes it), or export it in the launching environment."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}