Changelog
Release history of @ratel-ai/vercel-ai-sdk.
@ratel-ai/vercel-ai-sdk release history · npm · source
Synced verbatim from the package's
CHANGELOG.mdatratel-ai/ratel@d8635d5— do not edit by hand. Regenerate withpnpm sync:apiinapps/docs.
All notable changes to @ratel-ai/vercel-ai-sdk are documented here.
The format follows Keep a Changelog and this package adheres to Semantic Versioning.
[0.3.0] - 2026-07-28
Changed
- The
@ratel-ai/sdkpeer range moves to^0.6.0, tracking the SDK release that adds experimental adaptive usage ranking. The adapter's own API is unchanged, and 0.6.0 is additive over 0.5.3 — the range moves because at 0.x a caret does not span minors, so^0.5.3excludes0.6.x. npm resolves peers automatically, which makes that mismatch an install-timeERESOLVErather than a warning:@ratel-ai/vercel-ai-sdk@0.2.0cannot be installed alongside@ratel-ai/sdk@0.6.x, and this release cannot be installed alongside@ratel-ai/sdk@0.5.x. Staying on the 0.5 SDK means staying on adapter 0.2.0.
[0.2.0] - 2026-07-26
Added
RatelOtelIntegration, anai@7telemetry integration, at the new@ratel-ai/vercel-ai-sdk/otelentrypoint. It embeds@ai-sdk/otel'sOpenTelemetryemitter as a private delegate and stamps Ratel'sratel.originoverlay on every span through that emitter'senrichSpanhook, so hosts get the AI SDK's standardgen_ai.*spans plus theratel.*overlay. It only creates spans, onto a provider the host owns — it never registers a provider and never exports, so any processor already on that provider (Langfuse, a generic OTLP exporter, anything else) receives them. Its options are@ai-sdk/otel'sOpenTelemetryOptionsplusorigin, which picks theratel.originvalue and defaults toagent— right for the tool-loop spans an agent synthesizes, wrong for host-drivenembed/embedMany/rerank, so the value is the host's to set. AnenrichSpanof the host's own is called too and its attributes merged under Ratel's: every host attribute lands exceptratel.originitself, which the overlay keeps. A host hook that throws costs the host its own attributes for that span and nothing more — the emitter's own guard discards the whole return value, so the integration guards the host call separately to keepratel.originunconditional.Originis re-exported from the entrypoint, since@ratel-ai/telemetryis the adapter's dependency rather than the host's. Register exactly one emitting integration: this one, Langfuse's, and the bareOpenTelemetryall embed the same emitter, so two would duplicate everygen_ai.*span. Onai@5/ai@6there is no integration seam — passexperimental_telemetry: { isEnabled: true }per call instead.@ai-sdk/oteland@opentelemetry/apias optional peers, needed only by./otel. Optional and off-root are both load-bearing, not stylistic:@ai-sdk/oteldepends on an exactai@7, so a required peer or a root re-export drags a secondaiinto anai@5/ai@6host's type graph, where the two copies redeclareAI_SDK_DEFAULT_PROVIDERand break the host's build (TS2403) without it ever importing the integration. The compat matrix now asserts a packed consumer resolves no@ai-sdk/otel; its v7 rows typecheckRatelOtelIntegrationagainst the realai@7Telemetryinterface and then actually import and construct it.
Changed
- The adapter takes its first runtime dependency,
@ratel-ai/telemetry— the zero-dependencyratel.*constants package thatdist/otel.jsimports unconditionally. A peer could go unmet or unhoisted and break that import at load time withERR_MODULE_NOT_FOUND, which no typecheck would catch: theratel.*constants never reachotel.d.ts. It carries noaiof its own, so none of the duplicate-aihazard that keeps the other two peers optional applies. - Dev-pinned
aimoves to7.0.37(matching@ai-sdk/otel@1.0.37, which depends on that exact release), and the compat matrix's latest v7 row moves with it. The peer range is unchanged. - The
@ratel-ai/sdkpeer range moves to^0.5.3, the release that removedconfigureTelemetry()and moved telemetry provider ownership to the host. The adapter's own API is unchanged; the floor moves because the./otelentrypoint assumes a host-owned provider.
[0.1.0] - 2026-07-23
Added
- Initial release:
@ratel-ai/vercel-ai-sdk, the Vercel AI SDK adapter for Ratel.ratel(config).adaptTo(aiSdk())speaks the AI SDK's nativeTool/ModelMessageshapes through the framework-adapter SPI (ADR-0013): theingest/expose/recallMessagescodecs plus two per-turn recall idioms —appendRecall(mutate-and-suffix-append, cache-preserving) andprepareStep(step-0 fresh-array override forgenerateText/streamText/ToolLoopAgent). Peers@ratel-ai/sdkwith zero runtime dependencies; passes the@ratel-ai/sdk/testkitconformance battery (21 cases). Extracted from the live-verifiedbratislavaprototype. (Supersedes the pre-release@ratel-ai/ai-sdk-adapter@0.1.0-rc.1, published under the old name before the rename.) - AI SDK v5, v6, and v7 support: the
aipeer range is^5.0.0 || ^6.0.0 || ^7.0.0(ai@4predates the v5 tool/message reshape). One shared code path absorbs the per-major differences: provider-defined tools pass through under both discriminators (provider-definedinai@5,providerinai@6/ai@7), catalog executors receive both context spellings (experimental_contextandcontext), and a Promise-like JSON Schema is rejected synchronously before the registration batch commits. CI pins an exact-version compatibility matrix (ai@5.0.0,5.0.217,6.0.0,6.0.232,7.0.0,7.0.33), each of which builds, typechecks, tests, packs, and typechecks a packed-tarball consumer. Narrowing the supported-majors peer range is a breaking change of the adapter (see the README's Compatibility section). - Live execution-context forwarding: when the model runs one of your tools through
invoke_tool, the adapter forwards the AI SDK's complete live execution options (toolCallId,messages,abortSignal, and the version'sexperimental_context/context) unchanged to the tool, instead of a fabricated options object. The whole context rides through the catalog as an opaque value under a private, package-stable symbol tag (ADR-0013), so a sibling framework view over the same catalog can never have its context mistaken for AI SDK options. The driver-levelr.tools.catalog.invoke(id, args)escape hatch — which has no AI SDK invocation to thread — keeps the fabricated fallback. Requires@ratel-ai/sdk@^0.5.1.
Fixed
prepareSteppreserves the injected recall pair across the steps of onegenerateText/streamText/ToolLoopAgentrun onai@5/ai@6, which rebuild the prompt per step (the pair is reinserted at its original boundary from per-run state); onai@7, which carries the step-0 override forward itself, the duplicate check makes reinsertion a no-op.- Preserve AI SDK tool semantics through the capability funnel: nested input schemas now validate and apply defaults/transforms, streamed executors retain preliminary/final outputs, and target exceptions surface as native
tool-errorresults. Tools with AI SDK-only lifecycle or model metadata stay eagerly exposed in their original shape, preserving approval, per-tool context routing, input hooks, andtoModelOutput.
@ratel-ai/vercel-ai-sdk
Raw API of @ratel-ai/vercel-ai-sdk — the official Vercel AI SDK adapter: the aiSdk() factory for ratel().adaptTo(), speaking ai@5-7 tool and message shapes.
@ratel-ai/mastra
Raw API of @ratel-ai/mastra — the official Mastra adapter: the mastra() factory for ratel().adaptTo() plus recallProcessor(), speaking @mastra/core tool and message shapes.