{"record":{"id":"61afe62a1306c7ec","repo":"deepseek-ai/deepseek-harness","slug":"invalid-request-61afe6","errorCode":"INVALID_REQUEST","errorMessage":"DeepSeek Files API upload exceeds 128 MiB.","messagePattern":"DeepSeek Files API upload exceeds 128 MiB\\.","errorType":"exception","errorClass":"LlmError","httpStatus":null,"severity":"error","filePath":"packages/llm/llm-deepseek/src/files-api.ts","lineNumber":184,"sourceCode":"      response.status,\n      detail,\n    )\n  }\n\n  /**\n   * Upload one image with an explicit expiry.\n   * @param input - deterministic request-version bytes, media type, filename, lifetime, and cancellation.\n   * @returns the validated provider file object, including `expires_at`.\n   */\n  async upload(input: {\n    data: Uint8Array\n    mediaType: ImageMediaType\n    filename: string\n    expiresAfterSeconds: number\n    signal?: AbortSignal\n  }): Promise<DeepSeekFileObject & { expiresAt: number }> {\n    if (input.data.byteLength > MAX_FILE_UPLOAD_BYTES) {\n      throw new LlmError('DeepSeek Files API upload exceeds 128 MiB.', 'INVALID_REQUEST')\n    }\n    if (!Number.isSafeInteger(input.expiresAfterSeconds)\n      || input.expiresAfterSeconds < MIN_FILE_EXPIRY_SECONDS\n      || input.expiresAfterSeconds > MAX_FILE_EXPIRY_SECONDS) {\n      throw new LlmError('DeepSeek file expiry must be between 3600 and 2592000 seconds.', 'INVALID_REQUEST')\n    }\n    const form = new FormData()\n    form.set('purpose', 'user_data')\n    form.set('expires_after[anchor]', 'created_at')\n    form.set('expires_after[seconds]', String(input.expiresAfterSeconds))\n    form.set('file', new Blob([Uint8Array.from(input.data).buffer], { type: input.mediaType }), input.filename)\n    const response = await this.request('/files', { method: 'POST', body: form }, input.signal)\n    const file = parseFileObject(await response.json(), 'upload')\n    if (file.expiresAt === undefined) throw invalidResponse('upload')\n    return { ...file, expiresAt: file.expiresAt }\n  }\n\n  /**","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/llm/llm-deepseek/src/files-api.ts#L166-L202","documentation":"Error \"DeepSeek Files API upload exceeds 128 MiB.\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/llm/llm-deepseek/src/files-api.ts:184 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Keep each Files API upload under 128 MiB."],"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"}