@ai-sdk/openai
4.0.108 · 3 Nov 2026Apache-2.022M / weekRepositoryHomepagenpmAtom feed
4.0.108 is the newest release of 4.x.
In short
1 new1 internal
Release note
The section about @ai-sdk/openai of a note shared by several packages.
Patch Changes
Add ordered text, file, and JSON parts to experimental decision state. Support image input in OpenAI Decisions and language model adapters. Gateway retains its existing string and JSON request format and rejects files, as does TypeSafe AI.
Arrays passed directly as state now contain decision state parts. Wrap JSON arrays in an object or a json part.
Normalize all public state forms into an array of parts before calling decision providers. Providers receive text and JSON objects as text and json parts.
Serialize decision file bytes as base64 in OpenTelemetry state attributes. Model-call spans record normalized state parts, while outer spans retain public state inputs.
Preserve native JSON state in TypeSafe AI when state contains one JSON part. Label shared state in language-model decision prompts.