Skip to content

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 your package.json, or .mjs files). Each package's exports entries carry only types and default; 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 ​

PackageSupported 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's TelemetryOptions (it has no metadata or tracer), passed to each call as telemetry only when you set it. AI SDK 7 builds no spans by itself: register an integration once at startup (registerTelemetry(new OpenTelemetry()), with OpenTelemetry from @ai-sdk/otel), and every AI SDK call, Helix's included, emits telemetry; pass telemetry: { isEnabled: false } to opt one adapter out. Helix never registers anything itself.
  • A new error code, provider_stream_interrupted (category provider, retryable): the provider's stream ended without its stop marker (AI SDK 7's interrupted finish reason, or no output and no finish). The reply may be cut short, so the step never completes with it; with llmStepRetry the 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; set reasoningSummary in your providerOptions.openai to keep the old output.
  • OpenAI 4.x sends function tools as non-strict unless the tool asks. @ai-sdk/openai 4.x sends strict: false on every function tool whose definition does not set strict, 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 sent false. So an app upgrading from 3.x gets non-strict validation of its tools' arguments. Helix forwards a tool's own strict (defineTool({ ..., strict: true }); for __finish__, llmConfig.strictOutput). To keep strict validation, set strict: true on the tool. Its inputSchema must 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 reasoning option 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-Prefix header and every replayPrefix option. Drop replayPrefix from prepareHelixReconnectRequest({ ... }), resumeHeaders({ ... }) / ResumeTarget, snapshotResumeOptions(snapshot, { replayPrefix }) (its second argument and its replayPrefix result field), HelixResyncControl / controlChat(..., { replayPrefix }), useResumableChat()'s result, and handleChatStream's replayPrefix param. A server ignores the header now. Remove it from your CORS Access-Control-Allow-Headers lists too.
  • No client id needed. With no X-Existing-Message-Id the 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 409 state_not_resumable / resume_message_unknown.
  • Limit: a custom snapshot generateId. The id derived for a stock client is always msg-<startUIMessageCount>. If your host passes its own generateId in HandleChatStreamDeps.snapshotOptions, that derived id does not name a snapshot message, and a resume without X-Existing-Message-Id streams the tail without the prefix (logged as a warning). Send X-Existing-Message-Id (the snapshot's resumeMessageId, as prepareHelixReconnectRequest does from snapshotResumeOptions), 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-ID may 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 409 state_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: ai continues that message without a reset.
  • Seeding. snapshotResumeOptions(snapshot).messages still leaves the in-flight message out (the resume rebuilds it). A whole-snapshot seed also renders once on ai 7, unless your transport sets resumeStreamIsReplay: false.
  • Replayed client tools. A resume does NOT re-fire onToolCall for a client-tool call the prefix shows answered (it is replayed as streamed input plus its output, never tool-input-available), on a stock useChat / Chat too. It DOES fire onToolCall for a client call that is still unanswered: the client must answer it. useHelixChat also keeps the prefix's calls out of its auto-send predicate (the data-helix-replay begin marker names them), so a committed answer is never sent again.
  • withHelixStreamControl forwards the inner transport's resumeStreamIsReplay (true when the inner declares nothing) and its close.

useHelixChat ​

  • throttle replaces experimental_throttle (@ai-sdk/react 4's name), passed to useChat on both paths, a pre-built chat included. experimental_throttle is not accepted.
  • A new error code, client_tool_call_not_current (core; category state, not retryable). ai 7's addToolOutput / addToolApprovalResponse find 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 your onError with a HelixError of 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/react 4 stops a chat it created when the component unmounts (not a pre-built chat). The run goes on on the server, and a remount resumes it.
  • One transport wrapper per chat. The hook delegates to the LATEST transport you pass (as @ai-sdk/react 4 does), so a new transport object on a later render keeps stop and the re-attach controller on the live connection.
  • Visibility resumes are not raced. @ai-sdk/react 4 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, for ai 7's lastAssistantMessageIsCompleteWithToolCalls.

Deploying ​

Deploy the release to every service at once: the packages' peer ranges no longer accept AI SDK 6.

Released under the MIT License.