npm / @ai-sdk/openai-compatible
@ai-sdk/openai-compatible
What changed in @ai-sdk/openai-compatible 1 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
2 breaking1 security3 new APIs and options4 behavior and defaults13 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@ai-sdk/openai-compatible 319 changes
Breaking changes 2
Empty chat completion choices now return an AI SDK error.
Truncated chat streams are reported as errors.
New APIs and options 3
Supports URL-based image responses.
Supports uploaded file references via file_id.
Adds the portable max reasoning level, widening LanguageModelV4CallOptions['reasoning'] and ReasoningLevel. Exhaustive switches and mappings must handle max.
Behavior and default changes 4
Top-level embedding dimensions are now mapped to provider settings.
Capability declarations use confirmed model IDs, leaving unrecognized model names unknown; asynchronous lookups and middleware overrides can also resolve to unknown.
Video file parts are converted to video_url content parts.
Image generation token usage is now reported.
Fixes and other changes 10
Multipart tool results are now supported for compatible providers.
The User-Agent header now follows standards-compliant formatting.
Advertises file-input support for QuiverAI Arrow 2 and Arrow 2 Telos, and marks Together AI Gemini image inputs unsupported by the current single-image request mapping.
Fixes streamed tool calls when IDs are missing, blank, or repeated.
Extracts streaming response metadata after placeholder chunks.
Reasoning streams now remain contiguous when deltas include empty tool call arrays.
Supports text and thinking parts in array-based chat completion content and ignores unknown part types.
Sends reasoning_effort: "none" when top-level reasoning is disabled.
Handles tool call IDs that are empty strings.
Preserves Gemini thought signatures when using custom OpenAI-compatible provider names.
@ai-sdk/openai-compatible 23 changes
Security 1
Supports URL-based image responses with opt-in URL validation and credential origin handling; redirect targets are validated, unsafe request headers stripped, and credentials dropped on cross-origin redirects while existing unvalidated requests are preserved.
Fixes and other changes 2
Preserves streamed tool calls when their IDs or indices are unreliable.
Preserves unmapped fields in provider usage data, including fields nested in prompt_tokens_details and completion_tokens_details; mapped token counts are unaffected.
@ai-sdk/openai-compatible 11 changes
Fixes and other changes 1
Preserves streamed tool calls when their IDs and indices are unreliable.