SIGN IN SIGN UP

fix: warn when DeepSeek sampling options are deprecated or ineffective (#19404)

## Background

DeepSeek requests silently forwarded deprecated penalty fields and
ineffective temperature/topP settings during default V4 thinking mode,
misleading consumers about applied sampling behavior.

## Root Cause

The shared DeepSeek request builder serialized sampling options without
checking DeepSeek deprecations or the model's effective thinking mode.
Recorded generate and stream bodies confirmed all four fields were
forwarded without warnings.

## Summary

DeepSeek now omits deprecated penalty settings with deprecation
warnings, omits temperature/topP with actionable warnings when thinking
is active, and preserves supported sampling when thinking is disabled.
Azure-hosted DeepSeek retains penalty sampling behavior.

## Testing

Added generate and stream regression coverage for default V4 thinking
and explicitly disabled thinking, including request bodies and warnings.
Added documentation and patch changesets for DeepSeek and Azure.

## End-to-end Validation

- `pnpm -C examples/ai-functions exec tsx
src/reproduction/issue-19382-deepseek-sampling-warnings.ts` — recorded
replay completed successfully without the reproduction signal.

## Related Issues

Fixes #19382

Closes #19392

---------

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
0e36ab505836b6c7093cca5edf771520a2f2143d
Parent: 01fa8de
Committed by GitHub <noreply@github.com> on 8/25/2026, 12:00:36 AM