fix: preserve the DeepSeek file object discriminator in upload results (#19406)
## Background DeepSeek file uploads returned object: "file", but the published upload result omitted that discriminator from providerMetadata. ## Root Cause The DeepSeek response schema parsed the nullish object field, but DeepSeekFiles.uploadFile did not map it into provider metadata; the recorded response replay confirmed the resulting metadata loss. ## Summary Conditionally mapped response.object to providerMetadata.deepseek.object and added a patch changeset for @ai-sdk/deepseek. ## Testing Updated file upload mapping coverage to assert object: "file" is preserved and missing or null object values remain omitted. ## End-to-end Validation - `pnpm -C packages/deepseek build && pnpm -C examples/ai-functions exec tsx src/reproduction/issue-19390-deepseek-file-object-metadata.ts` exited successfully and preserved `object: "file"`. - `pnpm -C examples/ai-functions exec tsx src/upload-file/deepseek/image.ts` successfully uploaded a live image, exposed the discriminator, and completed generation. ## Related Issues Fixes #19390 Closes #19394 --------- Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com> Co-authored-by: gr2m <39992+gr2m@users.noreply.github.com>
A
ai-sdk-factory[bot] committed
f1cadd0e1d6d99315d5b2b892643a8c64312ab34
Parent: 8a15038
Committed by GitHub <noreply@github.com>
on 8/24/2026, 10:18:54 PM