deepseek-ai/deepseek-harness · error · LlmError

DISCOVERY_FAILED

DISCOVERY_FAILED

Error message

the endpoint's model listing has no "data" array; enter this provider's models by hand

What it means

Listing-shape guard in readListing while probing an OpenAI-compatible endpoint: the response body has no data array, so no model catalog can be extracted. The probe reached the endpoint; its reply is not a model listing.

Solutions

  1. Enter the provider's models by hand in the form
  2. Check that the baseURL points at the listing endpoint and the key is valid
  3. Verify the endpoint actually speaks an OpenAI-compatible listing
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at packages/llm/llm-pi-ai/src/discovery.ts:141 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/25c283d6fa6df3fa. Report an issue: GitHub.

Appendix: source

Thrown at packages/llm/llm-pi-ai/src/discovery.ts:141

  }
  const body = new Uint8Array(total)
  let offset = 0
  for (const chunk of chunks) {
    body.set(chunk, offset)
    offset += chunk.byteLength
  }
  return new TextDecoder().decode(body)
}

/**
 * Read one OpenAI-compatible listing reply. Entries without a usable id are
 * skipped rather than failing the whole interrogation: a single malformed row
 * should not deny the user the rest of a working endpoint's catalog.
 */
function readListing(body: unknown): LlmDiscoveredModel[] {
  const data = (body as { data?: unknown } | null)?.data
  if (!Array.isArray(data)) {
    throw new LlmError(
      'the endpoint\'s model listing has no "data" array; enter this provider\'s models by hand',
      'DISCOVERY_FAILED',
    )
  }
  const models: LlmDiscoveredModel[] = []
  for (const raw of data) {
    const entry = raw as ListingEntry | null
    const id = label(entry?.id)
    if (id === undefined) continue
    const name = label(entry?.name, entry?.display_name)
    const contextWindow = capacity(entry?.context_window, entry?.context_length)
    const maxTokens = capacity(entry?.max_output_tokens, entry?.max_tokens)
    models.push({
      id,
      ...name === undefined ? {} : { name },
      ...contextWindow === undefined ? {} : { contextWindow },
      ...maxTokens === undefined ? {} : { maxTokens },
    })

View on GitHub (pinned to b150a551b8)