Skip to content

Version Packages - #565

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
changeset-release/main
Open

github-actions[bot] wants to merge 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or setup this action to publish automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@openrouter/ai-sdk-provider@3.2.0

Minor Changes

  • #518 32fd6d9 Thanks @taku0! - Support reasoning parameter introduced in AI SDK v7

  • #564 1b22b05 Thanks @louisgv! - Add openrouter.decisionModel() as the preferred name for the Decisions API model. It shares one implementation with evaluationModel(), which is kept as the AI SDK-compatible name (the AI SDK calls evaluationModel() when resolving string model IDs through a default provider).

  • #553 59fe494 Thanks @warun7! - Implement rerankingModel on the provider. createOpenRouter() and the default openrouter instance now expose rerankingModel(modelId, settings?), which calls the OpenRouter /rerank endpoint and works with the AI SDK rerank() function. Previously the method existed in the typings but was undefined at runtime.

  • #552 5577361 Thanks @warun7! - Forward image part providerOptions.openrouter.imageDetail ('auto' | 'low' | 'high') as image_url.detail

  • #584 9a47373 Thanks @LukasParke! - Forward video file parts' providerOptions.openrouter.videoProcessing ('agentic' | 'static') as video_url.processing

  • #526 d8edda0 Thanks @Leonezz! - Implement WORKFLOW_SERIALIZE / WORKFLOW_DESERIALIZE hooks on the chat and completion language models so model instances can be used with @ai-sdk/workflow durable execution. Fixes the WorkflowRuntimeError: Failed to serialize step arguments thrown when a model is passed as a durable step argument (Model instances not serializable for durable execution (@ai-sdk/workflow) — missing WORKFLOW_SERIALIZE/DESERIALIZE hooks #525).

    Secrets are never written to workflow storage. Only modelId, settings, baseURL, compatibility, extraBody and the appName / appUrl headers (X-OpenRouter-Title, HTTP-Referer) are persisted; all other custom headers are dropped and the SDK user agent is re-applied on restore. A restored model re-reads its API key from OPENROUTER_API_KEY at request time, and a model created with BYOK api_keys throws a clear error at request time instead of silently falling back to OpenRouter credits.

Patch Changes

  • #585 b76b19b Thanks @LukasParke! - Honour part-level cacheControl on assistant text parts instead of silently dropping it, consistent with user messages. When an assistant text part carries cache control, the assistant content is sent as an array of text blocks with cache_control on that specific block; otherwise the content stays a plain string. Message-level assistant cache control is unchanged (related to Explicit cache_control on assistant messages does not produce cache writes/reads #498).

  • #566 b701273 Thanks @pedro757! - Accept max in the reasoning effort type so supported models can use it through typed model settings and provider options without an extraBody workaround.

  • #577 4013aa7 Thanks @5h0ov! - Fix decisionModel() / evaluationModel() with ai 7.0.133 and later, which wrap decision state in typed parts that were forwarded to the Decisions API as-is. Text and json parts are now unwrapped and image file parts are sent as image_url entries, while raw state from older ai@7 releases is passed through unchanged.

  • #632 087abdf Thanks @mattapperson! - Forward call-time providerOptions.openrouter in the embedding model (embed / embedMany). Options such as provider, user, dimensions and input_type were previously ignored. Provider routing preferences are now shallow merged from model settings, extraBody and providerOptions (later wins) instead of extraBody.provider replacing settings.provider (related to provider is ignored when supplied via providerOptions.openrouter #616).

  • #547 92961e4 Thanks @warun7! - fix: prevent assigning undefined keys during streaming reasoning_details accumulation (Streaming reasoning_details accumulation assigns signature: undefined, breaking subsequent AI SDK prompt validation #540)

  • #575 9ded35b Thanks @cpruijsen! - Forward complete-but-invalid streamed tool arguments to the AI SDK instead of replacing them with '{}' in the stream flush path. The SDK can now surface the model's real payload via InvalidToolInputError and run experimental_repairToolCall; '{}' is only substituted when nothing was streamed (no-argument tool calls).

  • #548 f54b359 Thanks @warun7! - Forward tool strict setting to function definitions in API requests

  • #586 cd86f5d Thanks @LukasParke! - Stop re-parsing the whole accumulated tool-call arguments on every streamed delta. A small incremental scanner now only lets the provider attempt a JSON parse once the arguments may be complete, removing quadratic CPU use for large streamed tool inputs. Emitted events are unchanged.

  • #551 bacdd1a Thanks @warun7! - Merge runtime provider routing options with configured image model provider preferences

  • #550 a76ca9f Thanks @warun7! - Preserve is_byok as isByok in providerMetadata.openrouter.usage

  • #549 d9d01b5 Thanks @warun7! - Declare specificationVersion 'v4' and embeddingModel on provider object returned by createOpenRouter

  • #583 5fe77f6 Thanks @LukasParke! - Fix streaming: keep separately signed reasoning.text blocks (e.g. multiple Anthropic thinking blocks in one answer) as separate reasoning_details entries instead of merging them under the first signature, which made replay fail with "Invalid signature in thinking block".

  • #517 b5f253f Thanks @noobshow! - Support cache_control on a tool's providerOptions (openrouter or anthropic namespace, snake_case or camelCase, same resolution as message-level cache control). It is now attached to that tool's entry in the outgoing tools array.

    Tool-level cache_control is passed through as-is. OpenRouter does not document it for the OpenAI-format tools array; Anthropic supports it on the last tool definition, so place the breakpoint there. OpenRouterCacheControl now also types the optional ttl ('5m' | '1h'), which was already passed through.

  • #536 0ad203a Thanks @shoemoney! - Fix completion model under AI SDK v7: accept the default toolChoice and emit text-start/text-delta/text-end lifecycle events

@github-actions
github-actions Bot force-pushed the changeset-release/main branch 9 times, most recently from d879ad7 to 4ff1042 Compare October 27, 2026 05:28
@github-actions
github-actions Bot force-pushed the changeset-release/main branch from 4ff1042 to f52fe70 Compare November 4, 2026 14:29
@github-actions
github-actions Bot force-pushed the changeset-release/main branch from f52fe70 to 4aa3a11 Compare November 4, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants