deepseek-ai/deepseek-harness · error · LlmError

INVALID_RESPONSE

INVALID_RESPONSE

Error message

DeepSeek Files API upload response does not match the submitted image.

What it means

Error "DeepSeek Files API upload response does not match the submitted image." thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/llm/llm-deepseek/src/file-store.ts:203

      throw new LlmError('DeepSeek chat image exceeds the 32 MiB per-image limit.', 'INVALID_REQUEST')
    }
    const scope = deepSeekFileScope(connection.baseURL, connection.apiKey)
    const now = this.now()
    const marginMs = policy.refreshMarginSeconds * 1_000
    const cached = await this.index.get(scope, version.variantId, now, marginMs)
    if (cached !== undefined) return { record: cached, uploaded: false }

    const client = this.client(connection)
    const upload = async (): Promise<DeepSeekUploadRecord> => {
      const remote = await client.upload({
        data: version.data,
        mediaType: version.mediaType,
        filename: filename(version),
        expiresAfterSeconds: policy.expiresAfterSeconds,
        signal,
      })
      if (remote.bytes !== version.data.byteLength) {
        throw new LlmError('DeepSeek Files API upload response does not match the submitted image.', 'INVALID_RESPONSE')
      }
      return {
        scope,
        attachmentId: version.attachment.attachmentId,
        variantId: version.variantId,
        fileId: remote.id,
        bytes: remote.bytes,
        createdAt: remote.createdAt * 1_000,
        expiresAt: remote.expiresAt * 1_000,
      }
    }

    let candidate: DeepSeekUploadRecord
    try {
      candidate = await upload()
    } catch (error: unknown) {
      if (!isFilesQuotaError(error)) throw error
      const deleted = await this.reclaimOldestOwned(connection, policy.quotaCleanupBatch, signal)

View on GitHub (pinned to b150a551b8)

Solutions

  1. Re-upload the image and verify the submitted bytes are unchanged in transit.

When it happens

Trigger: Thrown at packages/llm/llm-deepseek/src/file-store.ts:203 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/d214b218c0edbb68. Report an issue: GitHub.