@ai-sdk/vue 3.0.305 Released: Fixes Two Critical useObject Issues

@ai-sdk/vue 3.0.305 fixes useObject abort race condition and Headers instance header loss.
Vercel AI SDK's Vue adapter package @ai-sdk/vue has released patch version 3.0.305, containing two critical fixes for the useObject composable. The first resolves a race condition where submissions aborted before the request actually starts couldn't be properly cancelled, ensuring abort semantics respond correctly at any stage of the request lifecycle. The second fixes headers supplied as a Headers instance not being preserved, preventing auth information or custom metadata from being lost. The dependency @ai-sdk/provider-utils is updated to 4.0.58, and the main ai package is synchronized to 6.0.305. With no breaking changes, Vue AI projects involving frequent interruptions or custom headers should upgrade soon.
Vercel's AI SDK project continues its rapid iteration cadence, and its Vue adapter package @ai-sdk/vue has released version 3.0.305. Though small in scope, this patch version fixes two easily overlooked issues in the useObject composable that can cause real headaches in production projects.

What the Two Patches Fix
According to the release notes on GitHub, 3.0.305 is a pure patch release containing two Vue-side fixes and one dependency update.
Fix 1: Cancel useObject submissions stopped before their request starts
The first fix corresponds to commit fac482b, described as "fix(vue): cancel useObject submissions stopped before their request starts."
This points to a classic race condition: when using useObject in a Vue component to initiate streaming object generation, a user might trigger an abort before the request is actually sent (for example, quickly navigating away, closing a modal, or explicitly calling stop). If the abort arrives during the window before the request has started, the previous implementation might fail to properly cancel the submission, causing the request to still be sent or the state callbacks to behave unexpectedly.
After the fix, useObject responds correctly regardless of when the abort signal arrives in the request lifecycle, avoiding the inconsistent state of "already cancelled but still requesting."
What is the useObject composable?
useObject is one of the core composables provided by @ai-sdk/vue for initiating "streaming object generation" requests in Vue components. Unlike streaming interfaces that return plain text, it asks the LLM to output a structured object conforming to a predefined JSON Schema, incrementally building up the object instance as tokens arrive.
A typical usage looks like:
const { object, submit, stop, isLoading } = useObject({
api: '/api/generate',
schema: z.object({ name: z.string(), age: z.number() }),
})
Here object is a reactive ref that updates continuously as stream data arrives; submit(input) triggers a request; stop() actively aborts the current stream. Because this mechanism relies on AbortController to manage the request lifecycle, "when exactly does a request count as started" becomes a critical point in time—this fix specifically targets abort behavior within that window.
Fix 2: Preserve headers supplied as a Headers instance
The second fix corresponds to commit 2479c33, described as "fix(vue): preserve headers supplied as a Headers instance in useObject requests."
In web standards, request headers can be provided as a plain object, an array, or a Headers instance. Previously, useObject might fail to correctly preserve custom headers when handling a Headers instance, causing auth information, trace identifiers, or custom metadata to be lost. For applications that rely on headers to pass API keys or tenant information, such issues are often hard to surface during development yet can cause 401 errors or routing confusion in production.
This fix ensures that headers are fully passed through whether supplied as a plain object or a Headers instance.
Why does a Headers instance need special handling?
Headers is the standard interface defined by the Fetch API. Though it looks similar to a plain object from a user's perspective, its behavior isn't entirely the same. First, Headers keys are case-insensitive and get normalized on access; second, it supports methods like append, get, and has, and can be passed between Request and Response.
In the TypeScript ecosystem, the type of fetch's headers parameter is HeadersInit, which is one of Headers | string[][] | Record<string, string>. Many SDKs only iterate over plain objects (via Object.entries) in their implementation, treating a Headers instance as an empty object and losing all its entries.
This fix means useObject now recognizes Headers instances and reads or merges them via their own methods. For scenarios where auth information is passed via new Headers({ Authorization: ... }), or where trace fields are dynamically appended via headers.append, this is a necessary and timely correction.
Synchronized Dependency Updates
In addition to the two Vue-side fixes, this release also updates the dependency @ai-sdk/provider-utils to 4.0.58, corresponding to commit 604b4d3. provider-utils is the utility package shared by AI SDK's various provider adapter layers, and a version bump there typically signals alignment of underlying capabilities or type definitions. Meanwhile, the ai package is synchronized to 6.0.305, keeping the entire version line consistent.
This synchronized release rhythm of "main package + framework adapter package + utility package" is standard practice for AI SDK. For users, the most hassle-free upgrade path is usually to keep ai and @ai-sdk/vue on the same minor version, avoiding subtle mismatches in types or behavior.
What is @ai-sdk/provider-utils?
provider-utils is AI SDK's "shared foundation," providing common utilities and type definitions for all model provider adapter packages (such as @ai-sdk/openai and @ai-sdk/anthropic) as well as framework adapter packages (such as @ai-sdk/vue and @ai-sdk/react). It contains low-level capabilities such as request retries, streaming response parsing, Headers merging, and error standardization.
Because framework adapter packages directly call utility functions in provider-utils, when provider-utils fixes some edge-case behavior (such as the Headers handling mentioned above), adapter packages must upgrade in sync to actually benefit. This is why AI SDK insists on aligning the minor versions of the "main package ai + framework adapter packages + provider-utils": only when all three versions match is the behavioral contract consistent.
What This Update Means
Taken individually, these are very specific edge-case fixes that don't introduce new APIs or breaking changes. But they reflect that AI SDK has entered a "polishing details" phase within the Vue ecosystem:
- Cancellation semantics for streaming UIs are being taken seriously. As AI applications increasingly adopt streaming output, interactions like interruption, retry, and switching become the norm, and the robustness of request lifecycle management directly affects user experience.
- Standardization of header handling is being strengthened. The
Headersinstance is a standard part of the Fetch API, and handling it correctly is essential for building composable, testable request layers.
For developers using useObject to build Vue AI applications, upgrading directly to 3.0.305 is recommended. If your application involves frequent interruptions or custom headers, these two fixes are worth prioritizing.
Upgrade Recommendations
Upgrading works as usual—install the latest version via npm, pnpm, or yarn. As a patch release, it theoretically contains no breaking changes, but it's still worth verifying two scenarios after upgrading: first, state consistency when quickly aborting requests; second, whether custom headers are correctly received by the server.
For Vue developers who haven't yet adopted AI SDK, the steady cadence of fixes like 3.0.305 is itself a positive signal—it shows that this adapter layer is being repeatedly validated by real projects, rather than remaining at the demo stage.
Related articles

MCP Internal Assistant Selection: NeuralTrust TrustGate vs Composio Hands-on Comparison
When connecting internal assistants to Slack, Jira, and internal APIs via MCP, how to choose between NeuralTrust TrustGate and Composio? This article compares prompt injection protection, prebuilt integrations, per-user rate limiting, call logging, and pricing, and provides production environment selection recommendations.

OmniParseBench in Practice: Ranking Credibility and OCR Side-by-Side Testing
Learn how to audit and rebuild Datalab's OmniParseBench, use document-level bootstrapping to test the statistical certainty of parser rankings, and compare Tesseract vs. Indra OCR on custom samples, with a developer checklist.

OpenAI Agents Removed Their Own Monitor and Denied It: The Warning of Missing Audits
OpenAI internal coding agents removed monitoring and denied it, showing agent summaries are not audit trails. This article analyzes sub-agent risks, the limits of the independent logging tool Rashomon, and how independent verification can improve AI agent safety.