Upgrading: AI SDK 7
Helix moves to AI SDK 7 (ai 7, @ai-sdk/react 4, @ai-sdk/* providers 4.x) and drops AI SDK 6 (user rulings 2026-11-15: one supported floor, no backwards compatibility). Read AI SDK's own 7.0 migration guide for your own ai calls; this page covers what changes in Helix.
Platform: ESM-only, Node.js 22
Every Helix package is now ESM-only and needs Node.js 22 or later, like AI SDK 7 itself.
- Import the packages with
import, from an ES module ("type": "module"in yourpackage.json, or.mjsfiles). Each package'sexportsentries carry onlytypesanddefault; there is no CommonJS build. - A CommonJS consumer on Node 22.12 or later can still load a package through Node's
require(esm); nothing older is supported. - Run every service that loads a Helix package on Node 22 or later.
Versions
| Package | Supported range |
|---|---|
ai | ^7.0.165 |
@ai-sdk/react | ^4.0.169 (it pins its own ai; keep the pair aligned) |
@ai-sdk/anthropic | ^4.0.99 |
@ai-sdk/openai | ^4.0.111 |
@ai-sdk/google | ^4.0.114 |
AI SDK 7 still accepts a 3.x provider model (it adapts it), but tool-result images then regress on Anthropic and OpenAI; use the 4.x providers.
@helix-agents/llm-vercel
- Telemetry.
new VercelAIAdapter({ telemetry })now takes AI SDK 7'sTelemetryOptions(it has nometadataortracer), passed to each call astelemetryonly when you set it. AI SDK 7 builds no spans by itself: register an integration once at startup (registerTelemetry(new OpenTelemetry()), withOpenTelemetryfrom@ai-sdk/otel), and every AI SDK call, Helix's included, emits telemetry; passtelemetry: { isEnabled: false }to opt one adapter out. Helix never registers anything itself. - A new error code,
provider_stream_interrupted(categoryprovider, retryable): the provider's stream ended without its stop marker (AI SDK 7'sinterruptedfinish reason, or no output and no finish). The reply may be cut short, so the step never completes with it; withllmStepRetrythe runtime calls the model again. - Unchanged on purpose: a connection drop before any output is retried as before; a failing stream callback still ends the call; a forced tool choice that the model answers without the call is still core's recoverable miss (Helix sends the choice to the provider itself, so AI SDK 7's own enforcement never turns it into an error); a step's end is reported once per model call, from the stream's
finish-step, and the runtime writes it after the step's tool frames (RM-48, RM-141). - OpenAI 4.x sets
reasoningSummary: 'detailed'by default once a reasoning effort is set; setreasoningSummaryin yourproviderOptions.openaito keep the old output. - OpenAI 4.x sends function tools as non-strict unless the tool asks.
@ai-sdk/openai4.x sendsstrict: falseon every function tool whose definition does not setstrict, on the Responses API (openai(model)/openai.responses(model); its Chat Completions path still leaves the field out). 3.x left it out there too, so the Responses API applied its default, which is strict; 2.x already sentfalse. So an app upgrading from 3.x gets non-strict validation of its tools' arguments. Helix forwards a tool's ownstrict(defineTool({ ..., strict: true }); for__finish__,llmConfig.strictOutput). To keep strict validation, setstrict: trueon the tool. ItsinputSchemamust then fit OpenAI's strict subset (every property required, no additional properties), or the API answers 400. Helix does not change the default. - AI SDK 7's top-level
reasoningoption is not sent by Helix; keep your provider's own thinking options.
The client side: @helix-agents/ai-sdk
@helix-agents/ai-sdk needs ai ^7.0.165 and @ai-sdk/react ^4.0.169; its AI SDK 6 paths are gone.
Every resume replays the committed prefix (U5)
This is the change to read first. ai 7's DefaultChatTransport declares resumeStreamIsReplay: true, so a resumed Chat resets the in-flight message at the stream's first start and rebuilds it from what the server sends. A Helix server now replays the in-flight message's committed prefix on EVERY resume (user ruling 2026-11-15): a request that carries no messages (the reconnect GET) first gets that message's committed parts, from one snapshot read, between transient data-helix-replay begin / end markers, then the tail after that snapshot's cursor. A stock useChat / Chat with no Helix headers resumes without losing the message's committed text (before, its tail replaced a message that spanned runs, or one resumed from a snapshot cursor).
- Removed: the
X-Helix-Replay-Prefixheader and everyreplayPrefixoption. DropreplayPrefixfromprepareHelixReconnectRequest({ ... }),resumeHeaders({ ... })/ResumeTarget,snapshotResumeOptions(snapshot, { replayPrefix })(its second argument and itsreplayPrefixresult field),HelixResyncControl/controlChat(..., { replayPrefix }),useResumableChat()'s result, andhandleChatStream'sreplayPrefixparam. A server ignores the header now. Remove it from your CORSAccess-Control-Allow-Headerslists too. - No client id needed. With no
X-Existing-Message-Idthe server replays the prefix of the run's own response message (msg-<startUIMessageCount>). Rule I6 (a prefix only for a client-supplied id) is retired. A client id the snapshot does not hold still answers 409state_not_resumable/resume_message_unknown. - Limit: a custom snapshot
generateId. The id derived for a stock client is alwaysmsg-<startUIMessageCount>. If your host passes its owngenerateIdinHandleChatStreamDeps.snapshotOptions, that derived id does not name a snapshot message, and a resume withoutX-Existing-Message-Idstreams the tail without the prefix (logged as a warning). SendX-Existing-Message-Id(the snapshot'sresumeMessageId, asprepareHelixReconnectRequestdoes fromsnapshotResumeOptions), or keep the default ids. - Blocks at the cursor. The prefix carries each committed block whole. A text or reasoning block still open at the snapshot's cursor (its end streams after the commit) is not re-opened by the tail, so the client sees one part per block. If a block's deltas did continue live past the cursor (no runtime commits mid-block today), they would arrive as a following part of the same message: the text stays char-exact, the parts are two.
- Sequence ids after the cursor. The tail carries every sequence after the cursor that brings the client something new. A sequence whose frames the prefix already delivered may be absent: at a tool boundary the first chunk after the commit only closes the block the prefix carries whole and announces the call the prefix carries, so it sends nothing. The client's
Last-Event-IDmay therefore skip a sequence that carried only a closer. That is safe: the id advances with the next frame, and a re-attach from the earlier cursor gets the same tail again. - A prefix that cannot be read. A resume whose committed-prefix read fails answers typed, as the snapshot route does: a transient failure is a retryable 503 with
Retry-After; a corrupt message row is a non-retryable 409state_history_incomplete(retrying cannot fix it). - A send is not a resume. A request that carries the chat's messages (a send, a tool-answer submit) never gets the prefix:
aicontinues that message without a reset. - Seeding.
snapshotResumeOptions(snapshot).messagesstill leaves the in-flight message out (the resume rebuilds it). A whole-snapshot seed also renders once onai7, unless your transport setsresumeStreamIsReplay: false. - Replayed client tools. A resume does NOT re-fire
onToolCallfor a client-tool call the prefix shows answered (it is replayed as streamed input plus its output, nevertool-input-available), on a stockuseChat/Chattoo. It DOES fireonToolCallfor a client call that is still unanswered: the client must answer it.useHelixChatalso keeps the prefix's calls out of its auto-send predicate (thedata-helix-replaybegin marker names them), so a committed answer is never sent again. withHelixStreamControlforwards the inner transport'sresumeStreamIsReplay(truewhen the inner declares nothing) and itsclose.
useHelixChat
throttlereplacesexperimental_throttle(@ai-sdk/react4's name), passed touseChaton both paths, a pre-builtchatincluded.experimental_throttleis not accepted.- A new error code,
client_tool_call_not_current(core; categorystate, not retryable).ai7'saddToolOutput/addToolApprovalResponsefind the call in ANY message; only the last assistant message can hold a pending call. The hook now refuses an answer for a call (or an approval id) that an earlier assistant message holds: it calls youronErrorwith aHelixErrorof that code and rejects, and the part is left unchanged. Before, the part showed answered while no request would ever store it. - Unmount stops the local stream.
@ai-sdk/react4 stops a chat it created when the component unmounts (not a pre-builtchat). The run goes on on the server, and a remount resumes it. - One transport wrapper per chat. The hook delegates to the LATEST
transportyou pass (as@ai-sdk/react4 does), so a new transport object on a later render keepsstopand the re-attach controller on the live connection. - Visibility resumes are not raced.
@ai-sdk/react4 resumes a chat on its own when the page becomes visible after a network drop; the re-attach controller (createReattachController) skips while a resume of the chat is open. - Reloaded (snapshot) text parts carry
state: 'done', as a finished live message does, forai7'slastAssistantMessageIsCompleteWithToolCalls.
Deploying
Deploy the release to every service at once: the packages' peer ranges no longer accept AI SDK 6.