SIGN IN SIGN UP

fix: align DeepSeek thinking and reasoning effort options with the documented V4 contract (#19412)

## Background

DeepSeek generate and stream requests could emit undocumented
thinking.type="adaptive" and reasoning_effort="medium" values instead of
canonical V4 values.

## Root Cause

The provider schema exposed non-canonical values and request preparation
passed them through unchanged; the recorded reproduction confirmed both
generate and stream paths emitted those values.

## Summary

Restricted first-class options to canonical DeepSeek values, mapped
legacy and generic values to enabled, high, or max with compatibility
warnings, updated documentation, and added a patch changeset.

## Testing

Added generate and stream request coverage for canonical mappings and
warnings, plus type-level coverage ensuring undocumented values are no
longer exposed.

## End-to-end Validation

- `GENERATE_FIXTURE=… STREAM_FIXTURE=… pnpm -C examples/ai-functions
exec tsx --eval '…'` — recorded generate and stream responses completed
successfully; both requests emitted `thinking.type="enabled"` and
`reasoning_effort="high"` with compatibility warnings.

## Related Issues

Fixes #19381

Closes #19396

---------

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
560fc396e1ca1d507aa446dcdea2290bf0319cd4
Parent: 348dacb
Committed by GitHub <noreply@github.com> on 8/24/2026, 11:19:34 PM