SIGN IN SIGN UP

feat: align DeepSeek file response validation with the documented response contract (#19400)

## Background

DeepSeek file uploads need precise validation of documented response
fields without failing usable uploads when nonessential metadata is
omitted.

## Summary

DeepSeek uploads now validate file and user_data discriminators plus
nonnegative integer metadata, while retaining nullish optional metadata,
filename fallback behavior, and existing public API signatures.

## Testing

Added runtime coverage for complete, omitted, null, malformed, and
missing-ID responses, plus compile-time assertions for precise
discriminator types.

## End-to-end Validation

- Added and ran a focused DeepSeek response-metadata upload example.
- Built @ai-sdk/deepseek and successfully validated a live expiring file
upload against the production package output.

## Documentation

Documented DeepSeek response validation, optional metadata behavior,
filename fallback, and DeepSeek support in the core file-upload provider
table.

## Related Issues

Fixes #19391

---------

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
01fa8de5e73e7fba3b006396c4a9c016e1800081
Parent: 1ca2519
Committed by GitHub <noreply@github.com> on 8/24/2026, 11:44:40 PM