@tanstack/ai-bedrock
1.0.0 · 22 Oct 2026MIT38.3k / weekRepositorynpmAtom feed
38 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 1.x · latest line
1.0.0
22 Oct 2026- breaking
TanStack AI 1.0.0. This release removes every API that was deprecated in 0.x. Read the upgrade guide before you upgrade: tanstack.com/ai/latest/docs/migration/v1
Major Changes
- breaking
TanStack AI 1.0.0. This release removes every API that was deprecated in 0.x. Read the upgrade guide before you upgrade: tanstack.com/ai/latest/docs/migration/v1
Removed all
@deprecatedexports, options, fields, and type aliases. Each one has a replacement that already shipped in 0.x.Removed
addToolApprovalResponse()fromChatClientand every chat hook. Resolve the boundtool-approvalinterrupt withresolveInterruptinstead. The devtools eventtools:approval:respondedis also removed.Removed the old wire formats: the CUSTOM
approval-requestedandtool-input-availableevents, the[DONE]SSE line, thedatacopy offorwardedProps, pre-binding interrupt descriptors and theirapproval_requiredandclient_tool_inputreasons, and the STEP events that adapters sent next toREASONING_*events. Use a 1.0 client with a 1.0 server.Removed the
toolNamealias fromTOOL_CALL_STARTchunks. ReadtoolCallNameinstead.threadIdis now required onuseChatand every other chat hook,ChatClient, the generation hooks and clients,chat(),summarize(), the generation functions,codeModeWithSnippets(),selectRelevantSnippets(),CompactionContext, andSummarizeInput. TanStack AI no longer makes a thread id for you. Pass a stable id for each conversation.createChatHookfactory options no longer takethreadId: pass it on each hook call. Octane generation hooks takethreadIdinstead ofid.@tanstack/ai-sandboxremovesresolveDurableThreadIdandDurableThreadIdRequiredError.The published
@tanstack/ai-octane/uitypes are now strict.UI.Messages,UI.Message,UI.Part, andUI.Interruptstype their render children.ToolPropstypespart.inputandpart.outputfor the named tool.toolsComponentsandinterruptsComponentsare required when the chat options declare tools or named interrupts. Code that relied on the old loose types can fail to compile.A connection adapter's
connect()andsend()need the run context (withthreadId) as their fourth argument.ChatClientand the generation clients pass it.@tanstack/ai-sandbox:createToolBridgeCore(),startHostToolBridge(), aToolBridgeProvisioner, andexecuteHostTool()take a requiredthreadId. Bridged tools get it in their context.@tanstack/ai-sandbox: the harness tool bridge andexecuteHostTool()refuse a tool withneedsApproval. Before, the tool ran with no approval. RemoveneedsApproval, or run the tool with an HTTP adapter.stream()andrpcStream()pass the AG-UIRunAgentInputfor the run as the fourth factory argument, the same body the HTTP adapters send. Read it on the server withchatParamsFromRequestBody()orgenerationParamsFromBody(), sothreadId,runId, and interruptresumereach a server function.RunAgentInputis exported from@tanstack/ai/client.A generation
fetchergetsthreadIdandrunIdin its second argument, next tosignalandheaders. Pass them to the server generation call.generationParamsFromBody()andgenerationParamsFromRequest()read the generation input fromforwardedProps. A server that readsbody.datagetsundefined. Readbody.forwardedPropsinstead. They also requirethreadIdandrunIdand return them as strings, the same aschatParamsFromRequestBody()and the AG-UIRunAgentInput. A body that holds only the input is rejected.Removed the readers for data saved in old 0.x formats (old Cloudflare run-log records, a bare
UIMessagefrom client persistence, artifact records withoutblobKey).Removed provider models that are shut down.
@tanstack/ai-react-ui,@tanstack/ai-solid-ui, and@tanstack/ai-vue-uiget no 1.0 release. Import from@tanstack/ai-react/ui,@tanstack/ai-solid/ui, or@tanstack/ai-vue/ui.
- 0.6.x
0.6.2
21 Oct 2026Only updates dependencies:@tanstack/ai 0.71.0@tanstack/openai-base 0.16.0
0.6.1
19 Oct 2026Keep the provider's raw tool argument string for replay.
Patch Changes
Keep the provider's raw tool argument string for replay.
Adapters now send the raw argument string as
argsonTOOL_CALL_END.The tool call in the history keeps that exact string when it is the same JSON value as the parsed input, so the next request sends the provider's own bytes back (for example
1.50, or an id pastNumber.MAX_SAFE_INTEGER). When the parsed input differs, only the changed values are written again.The
TOOL_CALL_ENDthat reaches the client carries the same string inmetadata.tanstack.args, so the client history matches the server history. It no longer also carriesmetadata.tanstack.input: in-processchat()andStreamProcessorparseinputfromargs. Run the client and the server on the same release: an older client ignoresargs, so it builds the tool input from the streamed deltas only, and a tool call with no deltas (for example an Anthropic server tool) gets no input.History converters for Bedrock and the Gemini Interactions API send malformed tool arguments as
{}instead of failing the request.Gemini Interactions: the initial
step.argumentssnapshot goes out as aTOOL_CALL_ARGSdelta only when no argument deltas follow, so the deltas always add up to the final arguments.Malformed tool arguments are no longer turned into
{}by an adapter. The tool gets a "Failed to parse tool arguments as JSON" error that the model can repair. Mistral still ends the run with an error on malformed arguments, as before.
0.6.0
13 Oct 2026Text adapters now set one stable code on
RUN_ERRORwhen the input does not fit in the model's context window:code: 'context_overflow'.@tanstack/aiexports it asCONTEXT_OVERFLOW_CODE. The provider's own text stays inmessage.if (chunk.type === 'RUN_ERROR' && chunk.code === CONTEXT_OVERFLOW_CODE) { // shorten the messages, then call chat() again }These adapters set it: OpenAI and the other OpenAI-compatible adapters (from
code: 'context_length_exceeded'), Anthropic, Gemini, Bedrock (Converse, Chat Completions, and Responses), OpenRouter, Grok, Cloudflare Workers AI, and BytePlus.Changes to code that reads the old values:
Prompt caching is now on by default. Each
chat()call asks the provider to cache the stable start of the request (system prompt, tools, and earlier messages), so repeated requests cost less and answer sooner.Set reasoning with
chat({ reasoning })on the three Bedrock APIs.Breaking:
reasoning_effort(Chat Completions) andreasoning(Responses) are no longer inmodelOptions.// Before chat({ adapter: bedrockText('openai.gpt-oss-120b-1:0', { api: 'chat' }), messages, modelOptions: { reasoning_effort: 'high' }, }) // After chat({ adapter: bedrockText('openai.gpt-oss-120b-1:0', { api: 'chat' }), messages, reasoning: 'high', })Structured output sends no thinking, because Claude cannot think while a tool is forced.
Minor Changes
Text adapters now set one stable code on
RUN_ERRORwhen the input does not fit in the model's context window:code: 'context_overflow'.@tanstack/aiexports it asCONTEXT_OVERFLOW_CODE. The provider's own text stays inmessage.if (chunk.type === 'RUN_ERROR' && chunk.code === CONTEXT_OVERFLOW_CODE) { // shorten the messages, then call chat() again }These adapters set it: OpenAI and the other OpenAI-compatible adapters (from
code: 'context_length_exceeded'), Anthropic, Gemini, Bedrock (Converse, Chat Completions, and Responses), OpenRouter, Grok, Cloudflare Workers AI, and BytePlus.Changes to code that reads the old values:
OpenAI-compatible adapters gave
code: 'context_length_exceeded'. They now give'context_overflow'.rawEventstill has the provider's code.Anthropic, Grok, OpenRouter, and BytePlus gave the HTTP status or a general bad-request code for this error. Gemini and Bedrock Converse gave no code.
The Anthropic adapter now sends
RUN_ERRORwith this code when the model stops withstop_reason: 'model_context_window_exceeded'. Before, it sentRUN_FINISHEDwithfinishReason: 'stop', so a cut-off answer looked complete.
Prompt caching is now on by default. Each
chat()call asks the provider to cache the stable start of the request (system prompt, tools, and earlier messages), so repeated requests cost less and answer sooner.New
chat()optionpromptCache:'none' | 'short' | 'long', or{ retention, key }. The default is'short'. The key ispromptCache.key, else thethreadIdorconversationIdthat you give. AthreadIdthatchat()makes up is never the key.To turn it off, pass
promptCache: 'none'. Do this for a large prompt that you send to Claude one time only, because Claude bills the cache write.A middleware can change it for the next model call:
onConfiggetsconfig.promptCacheand can return a new value.Each adapter sends its own fields:
Claude on Anthropic, Bedrock Converse, and OpenRouter gets cache markers.
'long'asks for the 1-hour TTL.OpenAI (Responses and Chat Completions) gets
prompt_cache_key, andprompt_cache_retentionorprompt_cache_optionson'long'.Mistral gets
prompt_cache_key, and usage now reports cache reads.OpenRouter gets
sessionId.
A manual
cache_control,cachePoint,prompt_cache_key, orsessionIdwins over the automatic value.New types:
PromptCacheRetention,PromptCacheOptions, andResolvedPromptCache. Adapters readTextOptions.promptCache.
Set reasoning with
chat({ reasoning })on the three Bedrock APIs.Chat Completions sends
reasoning_effort. Responses sendsreasoning.effort.Converse sends thinking only for Claude: budget thinking in
additionalModelRequestFieldswith the interleaved-thinking beta, andmaxTokensgrows past the budget. A model with effort levels gets adaptive thinking withoutput_config.effort.offsends nothing.The reasoning data is in
model-meta.ts, keyed by catalog id.BedrockModelReasoningByNameandBEDROCK_MODEL_REASONINGcome from it.
Breaking:
reasoning_effort(Chat Completions) andreasoning(Responses) are no longer inmodelOptions.// Before chat({ adapter: bedrockText('openai.gpt-oss-120b-1:0', { api: 'chat' }), messages, modelOptions: { reasoning_effort: 'high' }, }) // After chat({ adapter: bedrockText('openai.gpt-oss-120b-1:0', { api: 'chat' }), messages, reasoning: 'high', })Structured output sends no thinking, because Claude cannot think while a tool is forced.
Patch Changes
The Bedrock text adapters (Converse, Chat Completions, and Responses) now set
inputModalitiesfrom the model catalog. Before, it was alwaysundefined. A known model gives the input kinds it reads, and an unknown model givesundefined.On the Responses API, this also means a text-only model such as
openai.gpt-oss-120b-1:0no longer gets image parts in a tool result, the same as other Responses adapters.The Bedrock Converse adapter now sends tool history as text when a chat request has no tools. Bedrock needs a
toolConfigfortoolUseandtoolResultblocks, so before this fix such a request failed with a 400 error. The saved messages do not change.The Bedrock Converse adapter now sends an inline tool-result image as a Converse image block on Amazon Nova and Anthropic Claude 3 and 4. Other models, URL images, and unsupported image types still send only the text. A tool result with only an image does not get an empty text block.
Keep a schema property or a tool argument named
__proto__. Before this fix, code that copied it without[key] = valuewent to the__proto__setter instead, so the key was lost.@tanstack/ai-utils:transformNullsToUndefinedandundoNullWideningkeep the key.@tanstack/openai-base: the strict schema and its null-widening map keep the key.@tanstack/ai-mistral: the null-widening map keeps the key.@tanstack/ai-openrouter: the Responses tool input normalizer keeps the key.@tanstack/ai-gemini: the Interactions adapter keeps the key in tool parameters.@tanstack/ai-bedrock: the Converse adapter puts the tool schemas and tool inputs back into the request body after the AWS SDK serializes it, because the SDK drops the key.
Keep a conversation valid when the next request goes to a different model.
Each assistant message records
metadata.tanstack.source({ provider, api, model }), andresponseIdand the resolvedmodelwhen the provider sends them. A failed or aborted answer getsstopReason: 'error'or'aborted'.RUN_FINISHEDhas a newresponseIdfield.TextAdapterhas new optionalproviderandapifields.When the next request goes to a different source, the adapter removes signatures and redacted thinking, turns readable thinking into text, and rewrites tool call IDs to the shape the target API accepts. Each call stays paired with its result.
Every request drops failed and aborted assistant batches and adds a
No result providedresult for an unanswered tool call. The saved history does not change.RUN_FINISHEDandRUN_ERRORmetadata now merge onto the assistant messages of that model call inStreamProcessor.Anthropic: the new
allowEmptySignatureoption (defaultfalse) replays unsigned thinking from the same source, for gateways. The newprovideroption names a gateway.Azure OpenAI reports the
azure-openai-responsesAPI.Gemini, Mistral, and Bedrock Converse send same-source thinking back to the model, in block order.
withPersistencewrites the source and the stop reason onto streaming snapshot rows.Adapter authors get
transformMessagesForReplay()andhashToolCallId()from@tanstack/ai/adapter-internals.
Send
chat({ toolChoice })to each provider.Anthropic and Bedrock Converse. Claude Fable 5.1, Mythos 5.1, Opus 5.5, and Sonnet 5.5 reject a forced tool, and every Claude model rejects one while thinking is on. On those,
'required'and a named tool fall back toauto.Bedrock Converse has no
none.'none'sends no tool config. Bedrock refuses tool calls in the history without a tool config, so the history goes out as text.Gemini maps the choice to
functionCallingConfig(AUTO,NONE,ANY, andallowedFunctionNames). With only provider tools, such as Google Search, it sends no tool config.OpenAI and Azure OpenAI (Responses), Grok, Mistral, and OpenRouter (Chat Completions and Responses) send their own
tool_choiceshape.
- 0.5.x
0.5.1
9 Oct 2026Only updates dependencies:@tanstack/ai 0.68.0@tanstack/openai-base 0.13.1
0.5.0
9 Oct 2026usage.promptTokensis now the total input on the Anthropic, Bedrock Converse, and Claude Code adapters. It is the uncached tokens plus the cache reads plus the cache writes. Before, it was the uncached tokens only.totalTokensnow uses the newpromptTokens. The cache parts stay inpromptTokensDetails.cachedTokensandpromptTokensDetails.cacheWriteTokens. Other adapters already reportpromptTokensthis way.Breaking: if your code adds
cachedTokensorcacheWriteTokenstopromptTokensto get the total input, it now counts the cache two times. UsepromptTokensas the total. To get the uncached tokens, subtractcachedTokensandcacheWriteTokensfrompromptTokens.Add
wrapFetchtochat(), to the middlewareonConfigconfig, and toTextOptions. A wrapper gets the next fetch and gives back a new fetch. Use it to change the URL, the headers, the request, or the response of a model call. The newFetchWrappertype names the wrapper.The engine chains the
chat()wrapper and the middleware wrappers into one function. A middleware wrapper runs inside thechat()wrapper and applies to one model call only.These text adapters send their requests through the wrapper: every adapter on
@tanstack/openai-base(OpenAI, the OpenAI-compatible adapters, Grok, Groq, BytePlus, LLM Gateway, Lovable, Vercel AI Gateway, Cloudflare, and the Bedrock Chat Completions and Responses APIs), Anthropic, Mistral, Ollama, and OpenRouter. The wrapper wraps the fetch of the adapter config, not the global fetch. An Anthropic or Ollama adapter with an injected client ignoreswrapFetch. In Cloudflare binding mode, the wrapper runs, but the binding does not send the URL or the headers. WithoutwrapFetch, the requests do not change.
Minor Changes
usage.promptTokensis now the total input on the Anthropic, Bedrock Converse, and Claude Code adapters. It is the uncached tokens plus the cache reads plus the cache writes. Before, it was the uncached tokens only.totalTokensnow uses the newpromptTokens. The cache parts stay inpromptTokensDetails.cachedTokensandpromptTokensDetails.cacheWriteTokens. Other adapters already reportpromptTokensthis way.Breaking: if your code adds
cachedTokensorcacheWriteTokenstopromptTokensto get the total input, it now counts the cache two times. UsepromptTokensas the total. To get the uncached tokens, subtractcachedTokensandcacheWriteTokensfrompromptTokens.
Patch Changes
Add
wrapFetchtochat(), to the middlewareonConfigconfig, and toTextOptions. A wrapper gets the next fetch and gives back a new fetch. Use it to change the URL, the headers, the request, or the response of a model call. The newFetchWrappertype names the wrapper.The engine chains the
chat()wrapper and the middleware wrappers into one function. A middleware wrapper runs inside thechat()wrapper and applies to one model call only.These text adapters send their requests through the wrapper: every adapter on
@tanstack/openai-base(OpenAI, the OpenAI-compatible adapters, Grok, Groq, BytePlus, LLM Gateway, Lovable, Vercel AI Gateway, Cloudflare, and the Bedrock Chat Completions and Responses APIs), Anthropic, Mistral, Ollama, and OpenRouter. The wrapper wraps the fetch of the adapter config, not the global fetch. An Anthropic or Ollama adapter with an injected client ignoreswrapFetch. In Cloudflare binding mode, the wrapper runs, but the binding does not send the URL or the headers. WithoutwrapFetch, the requests do not change.
- 0.4.x
0.4.5
8 Oct 2026Update the
openaiSDK dependency to^7.30.0.openai7 requires Node.js 22 or later.
Patch Changes
Update the
openaiSDK dependency to^7.30.0.openai7 requires Node.js 22 or later.
0.4.1 – 0.4.33 releases that only update dependencies@tanstack/ai 0.65.0@tanstack/openai-base 0.12.4Show each
- 0.3.x
0.3.11 – 0.3.154 releases that only update dependencies@tanstack/ai 0.61.0@tanstack/openai-base 0.11.1Show each
0.3.9
17 Sep 2026Use the Bedrock API compatibility config's
mantlePathon the Mantle endpoint so Gemma 4 hits/openai/v1instead of a misleading 401. Other models stay on/v1.
Patch Changes
Use the Bedrock API compatibility config's
mantlePathon the Mantle endpoint so Gemma 4 hits/openai/v1instead of a misleading 401. Other models stay on/v1.
0.3.7 – 0.3.82 releases that only update dependencies@tanstack/ai 0.54.0@tanstack/openai-base 0.10.11Show each
0.3.6
3 Sep 2026Accept
baseURLanddefaultHeaderson every adapter's client config so one gateway config (Cloudflare AI Gateway, Vercel AI Gateway, a corporate proxy) can be spread into any adapter. The vendor-specific names (httpOptions,serverURL,host,baseUrl,headers) keep working. Bedrock's Converse adapter now appliesdefaultHeaderstoo.
Patch Changes
Accept
baseURLanddefaultHeaderson every adapter's client config so one gateway config (Cloudflare AI Gateway, Vercel AI Gateway, a corporate proxy) can be spread into any adapter. The vendor-specific names (httpOptions,serverURL,host,baseUrl,headers) keep working. Bedrock's Converse adapter now appliesdefaultHeaderstoo.
0.3.5
2 Sep 2026Forward Bedrock Converse cache token counts to
TokenUsage.cacheReadInputTokensandcacheWriteInputTokensfrom the Conversemetadata.usageevent now land onpromptTokensDetails.cachedTokensandpromptTokensDetails.cacheWriteTokens, inchatStream,structuredOutput, andstructuredOutputStream. Bedrock'sinputTokenscounts only the uncached part of the input, so without these fields a cached request looked like a near-zero-input call. Both fields are omitted when Bedrock omits them.
Patch Changes
Forward Bedrock Converse cache token counts to
TokenUsage.cacheReadInputTokensandcacheWriteInputTokensfrom the Conversemetadata.usageevent now land onpromptTokensDetails.cachedTokensandpromptTokensDetails.cacheWriteTokens, inchatStream,structuredOutput, andstructuredOutputStream. Bedrock'sinputTokenscounts only the uncached part of the input, so without these fields a cached request looked like a near-zero-input call. Both fields are omitted when Bedrock omits them.
0.3.4
1 Sep 2026forward usage from Converse structuredOutputStream()
ConverseTextAdapter.structuredOutputStream()iterated the Converse event stream without ametadatabranch, so the trailing usage event was ignored andRUN_FINISHEDcarried no token counts on the streaming structured-output path. The normal chat path (processConverseStream) and the non-streamstructuredOutput()already handled it; this brings the third path in line.
Patch Changes
forward usage from Converse structuredOutputStream()
ConverseTextAdapter.structuredOutputStream()iterated the Converse event stream without ametadatabranch, so the trailing usage event was ignored andRUN_FINISHEDcarried no token counts on the streaming structured-output path. The normal chat path (processConverseStream) and the non-streamstructuredOutput()already handled it; this brings the third path in line.
0.3.2 – 0.3.32 releases that only update dependencies@tanstack/ai 0.52.0@tanstack/openai-base 0.10.8Show each
0.3.1
27 Aug 2026Stop requiring Zod as a peer dependency when the adapters do not import it at runtime.
Patch Changes
Stop requiring Zod as a peer dependency when the adapters do not import it at runtime.
0.3.0
24 Aug 2026Add headless BYOK:
defineByokin@tanstack/ai-client/byok, passbyokinto chat and generation hooks, and read keys on the relay withgetByokKeyfrom@tanstack/ai/byok/server. Provider ids are open slugs (x-byok-<slug>). Each adapter exports a{ id, label, env? }object (openaiByok, …);idis required.envis the env var name(s) for the relay — names only; the client never readsprocess.env. A wrong key surfaces as the provider's own401through the relay, so no client-side key check is needed. OpenRouter PKCE (@tanstack/ai-openrouter/pkce) saves the minted key underopenrouterByok.id.
Minor Changes
Add headless BYOK:
defineByokin@tanstack/ai-client/byok, passbyokinto chat and generation hooks, and read keys on the relay withgetByokKeyfrom@tanstack/ai/byok/server. Provider ids are open slugs (x-byok-<slug>). Each adapter exports a{ id, label, env? }object (openaiByok, …);idis required.envis the env var name(s) for the relay — names only; the client never readsprocess.env. A wrong key surfaces as the provider's own401through the relay, so no client-side key check is needed. OpenRouter PKCE (@tanstack/ai-openrouter/pkce) saves the minted key underopenrouterByok.id.
- 0.2.x
0.2.3 – 0.2.63 releases that only update dependencies@tanstack/ai 0.48.0@tanstack/openai-base 0.10.3Show each
0.2.2
18 Aug 2026Timestamp native and fallback structured-output events when they are emitted so their lifecycle remains chronologically ordered.
Patch Changes
Timestamp native and fallback structured-output events when they are emitted so their lifecycle remains chronologically ordered.
0.2.1
11 Aug 2026populate StructuredOutputResult.usage from non-stream structuredOutput()
Adapters that already returned tokens/cost on streaming structured paths were dropping response.usage on the non-stream structuredOutput() method. OpenRouter now forwards tokens and cost; openai-base, Mistral, and Bedrock Converse do the same for tokens so fallbackStructuredOutputStream and middleware can observe usage.
Patch Changes
populate StructuredOutputResult.usage from non-stream structuredOutput()
Adapters that already returned tokens/cost on streaming structured paths were dropping response.usage on the non-stream structuredOutput() method. OpenRouter now forwards tokens and cost; openai-base, Mistral, and Bedrock Converse do the same for tokens so fallbackStructuredOutputStream and middleware can observe usage.
0.2.0
10 Aug 2026Add a multimodal
embed()activity. A single primitive covers one input or a batch —inputaccepts a string, a text part, an image part, or a fused text+image item written as a nestedArray<ContentPart>([textPart, imagePart], the same shape chat messages use), one vector per item, with the accepted item types narrowed per model at compile time. Top-leveldimensionsrequests Matryoshka output sizes where supported. Results carryembeddings: [{ vector, index }]plususagewhen the provider reports it, andembed()participates in generation middleware, debug logging, OTel (gen_ai.operation.name: embeddings), and devtools events like every other activity.Provider adapters:
openaiEmbedding(text-embedding-3-small/large),geminiEmbedding(gemini-embedding-001),mistralEmbedding(mistral-embed, codestral-embed),ollamaEmbedding(nomic-embed-text and any local model),bedrockEmbedding(Titan Text V2, Titan Multimodal G1 with fused text+image, Cohere Embed v3 on Bedrock), and@tanstack/ai-cohere'scohereEmbedding(embed-v4.0, multimodal text+image with requiredinputType).publish internal dependency ranges as
^x.y.zinstead of exact pinsInternal dependencies on other TanStack AI packages used
workspace:*independenciesandpeerDependencies. pnpm rewrites that to an exact version at publish time, so a released package asked for e.g.@tanstack/ai-utils@0.4.0rather than^0.4.0.Two consequences for consumers:
These fields now use
workspace:^, which publishes as^x.y.z. Every package here is still0.x, so^0.43.1resolves to0.43.xonly — patches dedupe cleanly and no breaking minor is ever pulled in.devDependenciesdeliberately keepworkspace:*: they are never published, and*correctly means "always build against the local copy".
Minor Changes
Add a multimodal
embed()activity. A single primitive covers one input or a batch —inputaccepts a string, a text part, an image part, or a fused text+image item written as a nestedArray<ContentPart>([textPart, imagePart], the same shape chat messages use), one vector per item, with the accepted item types narrowed per model at compile time. Top-leveldimensionsrequests Matryoshka output sizes where supported. Results carryembeddings: [{ vector, index }]plususagewhen the provider reports it, andembed()participates in generation middleware, debug logging, OTel (gen_ai.operation.name: embeddings), and devtools events like every other activity.Provider adapters:
openaiEmbedding(text-embedding-3-small/large),geminiEmbedding(gemini-embedding-001),mistralEmbedding(mistral-embed, codestral-embed),ollamaEmbedding(nomic-embed-text and any local model),bedrockEmbedding(Titan Text V2, Titan Multimodal G1 with fused text+image, Cohere Embed v3 on Bedrock), and@tanstack/ai-cohere'scohereEmbedding(embed-v4.0, multimodal text+image with requiredinputType).
Patch Changes
publish internal dependency ranges as
^x.y.zinstead of exact pinsInternal dependencies on other TanStack AI packages used
workspace:*independenciesandpeerDependencies. pnpm rewrites that to an exact version at publish time, so a released package asked for e.g.@tanstack/ai-utils@0.4.0rather than^0.4.0.Two consequences for consumers:
Duplicate copies. An exact pin cannot dedupe. Installing a newer
@tanstack/aialongside a package pinned to the previous patch produced two copies in the tree, which breaksinstanceofchecks and module-level state, and inflates bundles.Unsatisfiable peers. An exactly pinned
peerDependencyconflicts the moment the internal package ships its next patch, forcing consumers into overrides or--legacy-peer-deps.
These fields now use
workspace:^, which publishes as^x.y.z. Every package here is still0.x, so^0.43.1resolves to0.43.xonly — patches dedupe cleanly and no breaking minor is ever pulled in.devDependenciesdeliberately keepworkspace:*: they are never published, and*correctly means "always build against the local copy".
- 0.1.x
0.1.5 – 0.1.62 releases that only update dependencies@tanstack/ai 0.43.1@tanstack/openai-base 0.9.10Show each
0.1.4
20 Jul 2026Reading the note…
0.1.3
16 Jul 2026Reading the note…
0.1.2
6 Jul 2026Reading the note…
0.1.1
3 Jul 2026Reading the note…
0.1.0
30 Jun 2026Reading the note…
- 0.0.x
0.0.1
30 Jun 2026Reading the note…