{"record":{"id":"c1870931009853f9","repo":"deepseek-ai/deepseek-harness","slug":"discovery-unsupported","errorCode":"DISCOVERY_UNSUPPORTED","errorMessage":"pi-ai protocol \"${api}\" has no model listing this build can read; enter this provider's models by hand","messagePattern":"pi-ai protocol \"(.+?)\" has no model listing this build can read; enter this provider's models by hand","errorType":"exception","errorClass":"LlmError","httpStatus":null,"severity":"error","filePath":"packages/llm/llm-pi-ai/src/discovery.ts","lineNumber":227,"sourceCode":"      }))\n    }\n  }\n  if (request.baseURL === undefined || request.baseURL.length === 0) {\n    throw new LlmError(\n      `pi-ai ships no catalog for provider \"${request.provider ?? ''}\", so its models can only come from its`\n      + \" endpoint; set a baseURL, or enter this provider's models by hand\",\n      'DISCOVERY_FAILED',\n    )\n  }\n  // A draft that has not chosen a protocol yet is asked as OpenAI Chat\n  // Completions: it is the shape a gateway is overwhelmingly likely to speak,\n  // and the alternative — refusing until the field is filled — would withhold\n  // the action from the case it exists for. The cost is a misdirected message\n  // when the endpoint speaks something else (an Anthropic gateway answers 401,\n  // which reads as a credential problem), and hand-entry remains the way out.\n  const api = request.api ?? 'openai-completions'\n  if (!LISTABLE_PROTOCOLS.has(api)) {\n    throw new LlmError(\n      `pi-ai protocol \"${api}\" has no model listing this build can read; enter this provider's models by hand`,\n      'DISCOVERY_UNSUPPORTED',\n    )\n  }\n  const url = listingUrl(request.baseURL)\n  // A key typed into the form wins: it is the one the user is testing, and it\n  // may be the replacement for exactly the stored key that is failing. The\n  // stored one is only asked for here, past the catalog short-circuit and the\n  // protocol check, so a route answered from the registry costs no credential\n  // lookup — and no diagnostic about a credential it never needed.\n  // A probe carrying no key stays unauthenticated, which is how a route that\n  // relies on the provider's own ambient discovery is meant to be asked.\n  const supplied = request.apiKey ?? await storedApiKey?.()\n  const apiKey = supplied === undefined ? undefined : usableProbeKey(supplied)\n  let response: Response\n  try {\n    response = await fetch(url, {\n      method: 'GET',","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/llm/llm-pi-ai/src/discovery.ts#L209-L245","documentation":"Error \"pi-ai protocol \"${api}\" has no model listing this build can read; enter this provider's models by hand\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/llm/llm-pi-ai/src/discovery.ts:227 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enter this provider's models by hand; this build cannot read the protocol's model listing."],"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"}