deepseek-ai/deepseek-harness · error · LlmError

DISCOVERY_UNSUPPORTED

DISCOVERY_UNSUPPORTED

Error message

pi-ai protocol "${api}" has no model listing this build can read; enter this provider's models by hand

What it means

Protocol guard in model discovery: the selected pi-ai protocol api has no model-listing reader this build can parse, and no shipped catalog backs the provider, so discovery cannot enumerate models for this route.

Solutions

  1. Enter this provider's models by hand
  2. Switch the provider profile to a supported protocol
  3. Set a baseURL so the endpoint can be interrogated
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at packages/llm/llm-pi-ai/src/discovery.ts:227 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/c1870931009853f9. Report an issue: GitHub.

Appendix: source

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

      }))
    }
  }
  if (request.baseURL === undefined || request.baseURL.length === 0) {
    throw new LlmError(
      `pi-ai ships no catalog for provider "${request.provider ?? ''}", so its models can only come from its`
      + " endpoint; set a baseURL, or enter this provider's models by hand",
      'DISCOVERY_FAILED',
    )
  }
  // A draft that has not chosen a protocol yet is asked as OpenAI Chat
  // Completions: it is the shape a gateway is overwhelmingly likely to speak,
  // and the alternative — refusing until the field is filled — would withhold
  // the action from the case it exists for. The cost is a misdirected message
  // when the endpoint speaks something else (an Anthropic gateway answers 401,
  // which reads as a credential problem), and hand-entry remains the way out.
  const api = request.api ?? 'openai-completions'
  if (!LISTABLE_PROTOCOLS.has(api)) {
    throw new LlmError(
      `pi-ai protocol "${api}" has no model listing this build can read; enter this provider's models by hand`,
      'DISCOVERY_UNSUPPORTED',
    )
  }
  const url = listingUrl(request.baseURL)
  // A key typed into the form wins: it is the one the user is testing, and it
  // may be the replacement for exactly the stored key that is failing. The
  // stored one is only asked for here, past the catalog short-circuit and the
  // protocol check, so a route answered from the registry costs no credential
  // lookup — and no diagnostic about a credential it never needed.
  // A probe carrying no key stays unauthenticated, which is how a route that
  // relies on the provider's own ambient discovery is meant to be asked.
  const supplied = request.apiKey ?? await storedApiKey?.()
  const apiKey = supplied === undefined ? undefined : usableProbeKey(supplied)
  let response: Response
  try {
    response = await fetch(url, {
      method: 'GET',

View on GitHub (pinned to b150a551b8)