unstale

npm / @ai-sdk/provider-utils

@ai-sdk/provider-utils

What changed in @ai-sdk/provider-utils 3 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

4 breaking3 security19 new APIs and options1 performance6 behavior and defaults30 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@ai-sdk/provider-utils 554 changes

Breaking changes 3

  • Arrays passed directly as state are interpreted as decision state parts; wrap JSON arrays in an object or a json part.

    5.0.57release notes

  • The API previously named evaluate is renamed to decide.

    5.0.54release notes

  • Packages are compiled for an ES2022 runtime target, which may affect runtime compatibility.

    5.0.49release notes

Security 2

New APIs and options 19

  • Adds the box decision question type with image bounds for TypeSafe AI.

    5.0.62release notes

  • Experimental decision state now supports ordered text, file, and JSON parts, and public state forms are normalized into parts before providers are called.

    5.0.57release notes

  • Image input is supported in OpenAI Decisions and language model adapters.

    5.0.57release notes

  • Adds the portable max reasoning level, widening LanguageModelV4CallOptions['reasoning'] and ReasoningLevel; exhaustive consumers must handle max.

    5.0.55release notes

  • Experimental streaming lifecycle callbacks were added for speech generation and transcription.

    5.0.53release notes

  • Adds a shared structured language-model evaluation adapter for Choice, Score, and Boolean evaluations, preserving exact labels and metadata, validating score bounds, and returning prompted Boolean P(true) estimates validated to be in [0, 1].

    5.0.43release notes

  • Code-mode supports discovering and updating tools during a conversation.

    5.0.42release notes

  • Upload results now expose the file's byte size.

    5.0.35release notes

  • Upload results now expose the file's creation time.

    5.0.35release notes

  • Adds an optional file deletion operation to FilesV4.

    5.0.35release notes

  • Adds an optional streaming file download operation to FilesV4.

    5.0.35release notes

  • Upload results now expose the file's expiration time.

    5.0.35release notes

  • Adds abortSignal as a FilesV4 call option so calls can receive an abort signal.

    5.0.35release notes

  • Adds headers as a FilesV4 call option.

    5.0.35release notes

  • Adds a { type: 'stream' } variant for upload data.

    5.0.35release notes

  • Adds an optional FilesV4 operation for retrieving file metadata.

    5.0.35release notes

  • Adds streaming multipart uploads with deterministic part ordering and failure-path stream teardown.

    5.0.35release notes

  • UI messages retain the approval request's reason separately from an approver's response reason.

    5.0.32release notes

  • Manual tool approval statuses can include a reason, which is preserved across core, model, and UI approval requests and surfaced for OPA requires-approval decisions.

    5.0.32release notes

Performance 1

Behavior and default changes 6

  • Decision choice responses now accept exact criteria labels.

    5.0.59release notes

  • Decision file bytes are serialized as base64 in state attributes; model-call spans record normalized state parts, while outer spans retain public state inputs.

    5.0.57release notes

  • Bedrock Nova 2 maps portable xhigh to maxReasoningEffort: 'high' and returns a compatibility warning; Fireworks maps max to high and returns warnings for minimal, xhigh, and max in generation and streaming results.

    5.0.55release notes

  • Provider usage is propagated for speech generation and transcription telemetry.

    5.0.53release notes

  • Telemetry was added to speech generation and transcription.

    5.0.53release notes

  • Language-model evaluation adapters now default to reasoning: 'none' using each provider's existing reasoning mapping; explicit providerOptions reasoning settings still override it.

    5.0.43release notes

Fixes and other changes 23

  • URL paths and query values now retain case sensitivity.

    4.0.59, 5.0.60release notesrelease notes

  • Shared state is labeled in language-model decision prompts.

    5.0.57release notes

  • TypeSafe AI preserves native JSON state when state contains one JSON part.

    5.0.57release notes

  • Rows are limited to 64 MB during batch result downloads.

    5.0.55release notes

  • Parallel tool calls are preserved when stream labels are missing or reused.

    5.0.55release notes

  • Hostname parts are validated using isValidHostnamePart.

    5.0.53release notes

  • Use a standards-compliant User-Agent header.

    5.0.51release notes

  • Fixes streamed tool calls with missing, blank, or repeated IDs.

    5.0.50release notes

  • Prompt conversion preserves original opaque URI strings in tagged file URLs.

    5.0.49release notes

  • Prompt conversion matches supported URL MIME types exactly so unsupported subtypes are not forwarded to providers.

    5.0.49release notes

  • Keeps per-value multimodal content aligned across automatic batches, including text-only entries, and validates content length and provider options after middleware transforms.

    4.0.54, 5.0.47release notesrelease notes

  • Executes manually approved tool inputs produced by schema transforms, preserves approved inputs during revalidation, and rejects histories whose reconstructed output differs.

    5.0.47release notes

  • Audio detection now recognizes AAC audio with ADTS headers.

    5.0.45release notes

  • Image detection now handles AVIF and HEIC images with variable ftyp box sizes.

    5.0.45release notes

  • Following validated redirects no longer waits for response clone cancellation.

    5.0.45release notes

  • Makes the lazy Undici import visible to deployment tracers.

    3.0.41, 4.0.57, 5.0.44release notesrelease notesrelease notes

  • Avoids crashing when DOMException is not a global constructor.

    5.0.42release notes

  • Plain text prefixes are no longer detected as BMP or GIF images.

    5.0.40release notes

  • The core uploadFile() helper now forwards abortSignal to the provider call.

    5.0.35release notes

  • The core uploadFile() helper now forwards headers to the provider call.

    5.0.35release notes

  • Transient network errors while reading successful response bodies are now marked retryable.

    4.0.50, 5.0.33release notesrelease notes

  • Preserves schema-valued additional properties when converting Zod 4 schemas.

    4.0.47, 5.0.29release notesrelease notes

  • Fixes handling of empty string tool call IDs.

    5.0.28release notes

@ai-sdk/provider-utils 47 changes

Security 1

  • Adds opt-in URL validation and credential origin handling for URL-based image responses, including redirect validation, unsafe header stripping, and dropping credentials on cross-origin redirects; existing unvalidated requests are preserved.

    4.0.61release notes

Fixes and other changes 6

  • Preserves streamed tool calls when their IDs and indices are unreliable.

    3.0.40, 4.0.56release notesrelease notes

  • Matches full MIME types exactly when checking native URL support.

    4.0.55release notes

  • Preserves media types on file URLs in tool results.

    4.0.55release notes

  • Preserves approved inputs during revalidation, rejects histories whose reconstructed schema output differs, and validates transformed UI tool inputs against the reconstructed output.

    4.0.54release notes

  • OpenAI and Azure OpenAI embedding requests are split by a conservative UTF-8 byte budget derived from their aggregate token limit, in addition to input count limits.

    3.0.35, 4.0.49release notesrelease notes

  • Imports now work in runtimes without a global fetch function.

    4.0.48release notes

@ai-sdk/provider-utils 32 changes

Breaking changes 1

  • Stops re-exporting createTestServer and TestResponseController; import these APIs from @ai-sdk/test-server/with-vitest instead.

    3.0.33release notes

Fixes and other changes 1

  • Transient network errors while reading successful response bodies are now marked retryable, including for AI Gateway responses.

    3.0.36release notes