{"record":{"id":"25c283d6fa6df3fa","repo":"deepseek-ai/deepseek-harness","slug":"discovery-failed","errorCode":"DISCOVERY_FAILED","errorMessage":"the endpoint's model listing has no \"data\" array; enter this provider's models by hand","messagePattern":"the endpoint's model listing has no \"data\" array; 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":141,"sourceCode":"  }\n  const body = new Uint8Array(total)\n  let offset = 0\n  for (const chunk of chunks) {\n    body.set(chunk, offset)\n    offset += chunk.byteLength\n  }\n  return new TextDecoder().decode(body)\n}\n\n/**\n * Read one OpenAI-compatible listing reply. Entries without a usable id are\n * skipped rather than failing the whole interrogation: a single malformed row\n * should not deny the user the rest of a working endpoint's catalog.\n */\nfunction readListing(body: unknown): LlmDiscoveredModel[] {\n  const data = (body as { data?: unknown } | null)?.data\n  if (!Array.isArray(data)) {\n    throw new LlmError(\n      'the endpoint\\'s model listing has no \"data\" array; enter this provider\\'s models by hand',\n      'DISCOVERY_FAILED',\n    )\n  }\n  const models: LlmDiscoveredModel[] = []\n  for (const raw of data) {\n    const entry = raw as ListingEntry | null\n    const id = label(entry?.id)\n    if (id === undefined) continue\n    const name = label(entry?.name, entry?.display_name)\n    const contextWindow = capacity(entry?.context_window, entry?.context_length)\n    const maxTokens = capacity(entry?.max_output_tokens, entry?.max_tokens)\n    models.push({\n      id,\n      ...name === undefined ? {} : { name },\n      ...contextWindow === undefined ? {} : { contextWindow },\n      ...maxTokens === undefined ? {} : { maxTokens },\n    })","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/llm/llm-pi-ai/src/discovery.ts#L123-L159","documentation":"Error \"the endpoint's model listing has no \"data\" array; enter this provider's models by hand\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/llm/llm-pi-ai/src/discovery.ts:141 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enter this provider's models by hand; the endpoint's model listing has no readable data array."],"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"}