Vercel AI SDK Batch Release: Google and Anthropic Both Fix Critical Defects

AI SDK routine release includes Google mid-conversation system instructions, Anthropic streaming fix, and cache billing correction.
Vercel AI SDK released a round of mainly patch-level version updates through the Changesets pipeline. The core package ai is upgraded to 7.1.1, adding a read-only settings getter to ToolLoopAgent, while many framework adapter packages are only transitively upgraded. Substantive fixes are concentrated in three areas: Google Provider introduces a system_input step to support adjusting system instructions mid-conversation while maintaining prompt caching hits, and completes safety categories and deprecated model declarations; Anthropic Provider fixes interruptions and losses caused by server-side tool results in message_start during streaming resumption; the OpenAI-compatible layer corrects the cache_write_tokens mapping so cache writes are no longer mistakenly counted as non-cached input, affecting many compatible providers. In addition, Mistral and Together AI align model metadata audits, and the workflow package delegates UI chunk conversion to Core to preserve more metadata. Overall, it reflects a direction of version convergence and reducing provider behavioral drift.

Vercel's AI SDK uses a multi-package monorepo structure, where each release is automatically aggregated by Changesets into a single PR and then pushed to npm. On the surface, this version package PR (#25819) looks like just a routine dependency upgrade pipeline, but looking closer, it carries several substantive fixes worth developers' attention: the Google side added the ability to inject system instructions mid-conversation, the Anthropic side fixed the long-standing issue of tool results being lost during streaming resumption, and the OpenAI-compatible layer corrected the billing accounting for cached tokens.
Core package ai@7.1.1: ToolLoopAgent gains read-only settings
As the hub of the entire ecosystem, the ai package is upgraded to 7.1.1 this time, which is a patch-level change. The only substantive change is adding a read-only settings getter to ToolLoopAgent. The change itself is small, but it has practical significance for scenarios where agent configuration needs to be inspected—previously, developers who wanted to confirm the current settings of an agent instance often had to go through internal properties or maintain their own copy, but now they can read it directly.
The updates to a large number of other packages (react, vue, svelte, angular, rsc, langchain, llamaindex, otel, etc.) are all transitive, merely following the version number change of ai@7.1.1 with no independent code changes.
Google Provider: Mid-conversation system instructions and safety categories completed
@ai-sdk/google@4.0.133 brings three changes, the most significant of which is support for "mid-conversation system instructions" and function tool updates in the Google Interactions API.
The specific approach is to introduce a system_input step to preserve the position of system messages in the conversation, while keeping baseline instructions and tool definitions stable to hit prompt caching. This is quite critical for cost control in multi-turn conversations: once the system prompt changes mid-conversation, the cache is prone to invalidation, and the design goal of system_input is precisely to allow instruction adjustments while maintaining cache hits.
The other two changes are more defensive: adding categories such as HARM_CATEGORY_JAILBREAK and HARM_CATEGORY_IMAGE_* to safetySettings[].category; and declaring deprecated models directly in their respective catalog entries instead of relying on a separate model ID list or comments, while preserving historical capabilities and model ID compatibility. The latter shares the same origin as the change in @ai-sdk/openai@4.0.130, belonging to a cross-provider metadata cleanup.
Prompt caching is a cost optimization mechanism provided by mainstream large model APIs: the server caches the computation results of the request prefix (usually stable parts such as system instructions and tool definitions), and subsequent requests that hit the same prefix can directly reuse the cache, significantly reducing billed tokens and first-token latency. Cache hits depend on the prefix being byte-for-byte identical, so any change to content within the prefix will cause the cache to be invalidated and the entire segment to be re-billed. This is exactly the background for the Google Provider introducing the system_input step—it expresses system instructions as a positional step in the conversation rather than simply replacing baseline instructions, thereby allowing instructions to be adjusted mid-conversation while keeping the cacheable prefix as stable as possible. For applications with multi-turn, long system prompts, the cache hit rate directly determines the per-conversation cost.
Anthropic Provider: Fix for lost tool results during streaming resumption
@ai-sdk/anthropic@4.0.115 has only one fix, but it hits a real and subtle bug: when a resumed Anthropic response carries server-side tool results in the message_start content, streaming processing fails.
The new logic treats these results as independent content blocks, thereby preserving tool results and source information. For applications that use Anthropic server-side tools and rely on the streaming resumption mechanism, this issue previously caused response interruptions or lost tool results, and only after the fix does the behavior match expectations. Both @ai-sdk/anthropic-aws and @ai-sdk/minimax inherit this fix through dependencies.
Server-side tools refer to tools executed directly on the server by the model provider, such as Anthropic's web search, code execution, etc., where both the call and the result do not go through the client. In contrast, client-side tools require the application to execute them itself and send the results back. Results from server-side tools usually appear in the response stream as specific content blocks; when a streaming connection is interrupted and resumed through the resumption mechanism, these results may appear in the initial content carried by the message_start event rather than in subsequent incremental events. If the stream handler only parses content blocks from incremental events, it will miss this part of the results, manifesting as lost tool results or missing source information. The core of this fix is to make streaming processing recognize the results carried in message_start as independent content blocks as well, thereby maintaining consistency with server-side state in resumption scenarios.
OpenAI-compatible layer: Billing accounting fix for cache write tokens
@ai-sdk/openai-compatible@3.0.100 fixes the mapping issue for prompt_tokens_details.cache_write_tokens: it now correctly maps to inputTokens.cacheWrite and deducts the cache write portion from inputTokens.noCache.
Previously, cache write tokens were counted as non-cached input, causing deviations in usage statistics and cost accounting. This fix affects a large swath of providers using the OpenAI-compatible protocol through dependency propagation, including baseten, cerebras, deepinfra, fireworks, huggingface, togetherai, tencent, zai, and others.
Cache write and cache read are two types of tokens distinguished in usage statistics by APIs with caching capabilities. Taking Anthropic's explicit caching as an example, content written to the cache for the first time is billed at a higher unit price (cache write), and subsequent cache hits are billed at a lower unit price (cache read). The OpenAI-compatible protocol exposes such detailed fields through prompt_tokens_details. If the SDK does not map cache_write_tokens separately to inputTokens.cacheWrite, these tokens will be merged into noCache, resulting in incorrect classification of input tokens—the total may remain unchanged, but cost accounting and cache hit rate statistics will be distorted. For applications that bill by token or perform cost attribution, such mapping errors will directly reflect on bills and reports, so although the fix is small, its impact covers all providers using this compatibility layer.
Mistral and Together AI: Model metadata aligned with audit results
Both @ai-sdk/mistral@4.0.95 and @ai-sdk/togetherai@3.0.103 received the same change: aligning the provider's model capability and availability metadata with the results of a model audit, covering unavailable model IDs and verified feature limitations. Mistral additionally received the same "declare deprecated models directly in catalog entries" change as other providers.
This kind of metadata cleanup looks tedious, but it directly determines whether the SDK can correctly determine which capabilities a model supports at runtime; after upstream models are retired or capabilities are adjusted, if the SDK-side declarations are not synchronized, callers will encounter unexpected errors.
@ai-sdk/workflow: Returning UI chunk conversion to Core
@ai-sdk/workflow made an architectural convergence in 2.0.123: toUIMessageChunk no longer maintains its own switch statement, but delegates standard stream fragments to the toUIMessageChunk of the ai package.
The benefit is preserving a batch of information that was previously lost, including provider custom fragments (such as openai.compaction), tool result and error metadata (preliminary, providerExecuted, providerMetadata, toolMetadata, dynamic), reasoning-file, tool-approval-response, and citation information. At the same time, error redaction and the default value of sendSources (false) are also aligned with AI SDK Core. toUIMessageChunk and createModelCallToUIChunkTransform now both accept and forward four parameters: sendReasoning, sendSources, onError, and redactToolErrors.
What this release shows
Judging from the version numbers, this is a maintenance release mainly consisting of patches, but for teams that heavily rely on multiple providers, the value of several of these fixes is not small: Anthropic's streaming resumption issue directly affects online availability, the cache billing fix in the OpenAI-compatible layer affects the accuracy of cost accounting, and Google's system_input relates to the cache efficiency of multi-turn conversations.
More importantly, a detail shows the SDK's evolution direction—the workflow package abandoning its self-maintained conversion logic and having Core handle it uniformly, and multiple providers consolidating deprecated model declarations into catalog entries, both point to the same thing: converging scattered compatibility logic into a single source of truth, reducing behavioral drift between providers. For users, this convergence means a lower probability of encountering unexpected differences when switching between providers.
Changesets is a version management and release tool commonly used in JavaScript monorepos: contributors submit change description files in PRs, and at release time the tool aggregates and calculates new version numbers for each package, generates CHANGELOGs, and automatically creates a version release PR. This is also why the title of this PR looks like @ai-sdk/vue@4.0.191: Version Packages—it is not a manually written feature commit, but a pipeline artifact. Understanding this helps in reading such PRs: the version number upgrade itself carries limited information, and what is truly worth paying attention to is the substantive changes listed in the CHANGELOG, as well as the semantic versioning convention (semver) corresponding to patch, minor, and major. In a multi-package repository, a patch upgrade of a core package often drives a large number of surrounding packages to upgrade synchronously through dependency propagation, which is also why dozens of packages changed version numbers without code changes this time.
Related articles

ICM-Architect: Designing AI Agent Architecture with Folder Structures
GitHub project RinDig/icm-architect uses folder structures as agent architecture, supporting from-scratch design or restructuring existing directories. It gained 2,810 stars in a single day—worth attention from agent developers.

CrossDesk: A Lightweight Cross-Platform Remote Desktop with Web Access
CrossDesk is a lightweight cross-platform remote desktop software written in C++, supporting Web client access, with over 10,000 stars on GitHub. This article analyzes its lightweight design, cross-platform capabilities, and Web access features, and discusses suitable use cases.

GitHub Daily · December 06: Local AI and Agent Infrastructure Both Surge
GitHub Trending Dec 06: local AI inference surges with Strata and omlx, while agent infrastructure matures with Chrome MCP, openworker, and more.