npm / @openrouter/ai-sdk-provider
@openrouter/ai-sdk-provider
What changed in @openrouter/ai-sdk-provider 1 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
11 breaking2 security19 new APIs and options3 behavior and defaults42 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@openrouter/ai-sdk-provider 34 changes
Breaking changes 1
Image generation switches to a dedicated images API.
New APIs and options 2
Adds evaluationModel backed by the Decisions API.
The provider adds support for Vercel AI SDK v7.
Fixes and other changes 1
Consecutive streaming reasoning.summary deltas are now merged.
@openrouter/ai-sdk-provider 260 changes
Breaking changes 9
Accumulated reasoning_details are no longer attached to reasoning-delta events.
Using this release requires ai@^6.0.0.
The provider migrates from EmbeddingModelV2 to EmbeddingModelV3 for AI SDK v6 compatibility.
The provider migrates from LanguageModelV2 to LanguageModelV3 for AI SDK v6 compatibility.
LanguageModelV3FinishReason now returns an object with unified and raw fields.
The provider migrates from ProviderV2 to ProviderV3 for AI SDK v6 compatibility.
Type imports change from SharedV2* to SharedV3*.
Usage adopts the nested v6 format, with input token totals and cache counts and output token totals, text, and reasoning.
The required zod peer dependency range is ^3.25.0 || ^4.0.0.
Security 2
Signature validation now also covers the Gemini format.
Entries without valid signatures are stripped from reasoning.text.
New APIs and options 16
You can now opt out of response_format strict mode.
Adds video generation support through VideoModelV3.
Anthropic eager_input_streaming is now supported via tool providerOptions.
Temperature and other common settings can now be set in model-level configuration.
Adds a provider-defined web search tool for use with OpenRouter.
Adds support for video URLs.
Adds the appName option for app identification headers.
Adds the appUrl option for app identification headers.
Adds explicit cache_control support for Anthropic automatic prompt caching.
Image generation supports the files parameter for image editing.
Adds support for the auto-router plugin.
Adds support for reasoning effort values xhigh, minimal, and none.
Adds the imageModel method for image generation support.
Adds includeRawChunks support for streaming.
Adds support for the response-healing plugin.
File content parts support file_id.
Behavior and default changes 2
doGenerate now includes the raw response body.
The provider's specificationVersion changes to 'v3'.
Fixes and other changes 31
Sends null content for tool-only assistant messages.
Trailing-whitespace deltas no longer emit duplicate tool-call events.
The image URL regex now allows query strings and fragments.
Preserves empty reasoning_details arrays in multi-turn conversations.
A defensive usage fallback was added in the streaming flush handler.
Serializes tool call arguments deterministically for cache consistency.
Enforces unique tool call IDs for parallel tool calls.
Streaming tool call lifecycles now emit tool-input-end events.
The provider now respects AI_SDK_LOG_WARNINGS when controlling warning logs.
Prevents duplicate reasoning blocks when a signature arrives after text.
Reasoning and text streams now use unique IDs.
Stops emitting [REDACTED] for encrypted reasoning details.
Infers the tool-calls finish reason when finish_reason is unknown.
Handles socket termination during a stream gracefully.
Tool messages now include the tool name to match the OpenAI API specification.
Preserves structured multimodal content in tool results.
Strips reasoning text when reasoning_details are missing.
Surfaces detailed error information from provider metadata.
Preserves the thinking block signature in streaming reasoning deltas.
Missing noCache, text, and cacheWrite token usage detail fields are now computed.
The reasoning-end event now includes accumulated reasoning_details.
System messages with block-level cache control now always use array content.
Deduplicates reasoning_details across multi-turn conversations.
Excludes undefined cost from providerMetadata.
Makes schema fields optional for web search citations.
Populates usage.raw with the OpenRouter raw usage accounting object.
User-specified User-Agent headers are respected without modification.
Handles tool calls with a missing arguments field.
Message-level cache_control is applied only to the last text part.
Prevents duplicate reasoning_details when converting messages back to API format.
The peer dependency changed from exact version 6.0.3 to ^6.0.0, allowing compatible 6.x versions.
@openrouter/ai-sdk-provider 113 changes
Breaking changes 1
FileParserPlugin is no longer automatically enabled.
New APIs and options 1
Adds support for audio input using the input_audio format.
Behavior and default changes 1
The provider adds a User-Agent header identifying its version to requests.
Fixes and other changes 10
Fixes an issue that broke APICallError.
The error response schema uses the SDK ChatErrorError type.
File uploads support the file annotation type.
Fixes validation errors for image elements produced by the file parser.
Fixes processing of large PDFs with FileParserPlugin.
OpenRouterProvider extends ProviderV2 instead of LanguageModelV2.
Reasoning is transformed into thinking blocks when using tools.
Gemini reasoning_details are preserved across multi-turn conversations.
Reasoning accumulation is fixed so signatures are passed back correctly.
Schema validation is relaxed.