{"record":{"id":"7b6b5bafdd2b515e","repo":"deepseek-ai/deepseek-harness","slug":"invalid-credential","errorCode":"INVALID_CREDENTIAL","errorMessage":"this provider's API key is blank; enter it on the Models page, or clear it to probe unauthenticated","messagePattern":"this provider's API key is blank; enter it on the Models page, or clear it to probe unauthenticated","errorType":"exception","errorClass":"LlmError","httpStatus":null,"severity":"error","filePath":"packages/llm/llm-pi-ai/src/discovery.ts","lineNumber":175,"sourceCode":"      ...contextWindow === undefined ? {} : { contextWindow },\n      ...maxTokens === undefined ? {} : { maxTokens },\n    })\n  }\n  return models\n}\n\n/**\n * Accept one probe key, or refuse it before the header is built. Without this\n * the `fetch` below would throw a ByteString `TypeError` that this function's\n * catch reports as `could not reach <url>` — blaming the network for a local,\n * deterministic fault.\n * @param raw - the key typed into the form or read from storage.\n * @returns the trimmed, usable key.\n */\nfunction usableProbeKey(raw: string): string {\n  const checked = normalizeApiKey(raw)\n  if (checked.ok) return checked.value\n  throw new LlmError(\n    checked.reason === 'empty'\n      ? 'this provider\\'s API key is blank; enter it on the Models page, or clear it to probe unauthenticated'\n      : 'this provider\\'s API key contains characters no HTTP header can carry; paste the raw key only',\n    INVALID_CREDENTIAL_CODE,\n  )\n}\n\n/**\n * Interrogate one draft provider endpoint for the models it advertises.\n * @param request - the endpoint, protocol, and one-shot credential to use.\n * @param storedApiKey - the credential the named route already stored, asked\n *   for only when the draft carries none and only on the path that reaches the\n *   network. A configuration surface never holds a stored secret — it edits a\n *   redacted descriptor — so without this an already-configured route would be\n *   interrogated unauthenticated and answer 401.\n * @returns the advertised models in endpoint order.\n * @throws LlmError when the protocol has no readable listing, the endpoint\n *   refuses or fails the request, or the reply is not a model listing.","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/llm/llm-pi-ai/src/discovery.ts#L157-L193","documentation":"Error \"this provider's API key is blank; enter it on the Models page, or clear it to probe unauthenticated\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/llm/llm-pi-ai/src/discovery.ts:175 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enter the API key on the Models page, or clear it to probe the provider unauthenticated."],"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"}