SIGN IN SIGN UP

feat: expose Mistral prompt cache keys for chat completions (#19499)

## Background

Mistral users need a stable cache-affinity key for requests sharing
prompt prefixes, especially multi-turn and tool-loop workloads that
repeatedly send growing conversation history.

## Summary

Added the typed `promptCacheKey` Mistral chat provider option and
serialize it as `prompt_cache_key` for generation and streaming
requests, with a patch changeset.

## Testing

Added runtime coverage for generated and streamed request serialization
plus compile-time coverage ensuring prompt cache keys accept strings and
reject numbers.

## End-to-end Validation

- Added and successfully ran a live Mistral classification example that
sends two related requests with one stable prompt cache key.

## Documentation

Documented the new provider option, usage example, multi-step behavior,
best-effort cache affinity, and guidance against placing sensitive data
in cache keys.

## Related Issues

Fixes #19498

Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com>
Co-authored-by: Pldesch <61841526+Pldesch@users.noreply.github.com>
A
ai-sdk-factory[bot] committed
ff354347430b2d06be2262077969870b6c7789c6
Parent: e21bde7
Committed by GitHub <noreply@github.com> on 8/25/2026, 3:11:36 PM