fix(deps): update dependency @tanstack/ai-ollama to v0.8.13#19
Open
renovate[bot] wants to merge 1 commit into
Open
fix(deps): update dependency @tanstack/ai-ollama to v0.8.13#19renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
1c0e7a8 to
94dc58d
Compare
94dc58d to
fadb5ad
Compare
fadb5ad to
b7c880e
Compare
caa3388 to
a4374cc
Compare
a4374cc to
39a3956
Compare
39a3956 to
a63d6ad
Compare
a63d6ad to
d74c700
Compare
d74c700 to
e0afe9f
Compare
e0afe9f to
135d787
Compare
135d787 to
7fc051c
Compare
7fc051c to
33e7c59
Compare
33e7c59 to
a7a7a42
Compare
a7a7a42 to
a082456
Compare
22a0f1c to
700a75f
Compare
700a75f to
e05436c
Compare
e05436c to
4b64b9b
Compare
4b64b9b to
0beb1f8
Compare
0beb1f8 to
c7b9c92
Compare
c7b9c92 to
d3218df
Compare
d3218df to
003d0d3
Compare
003d0d3 to
79b5a2d
Compare
79b5a2d to
06c4ea8
Compare
06c4ea8 to
cd4afaa
Compare
cd4afaa to
af76776
Compare
af76776 to
69fb355
Compare
69fb355 to
1e665c2
Compare
1e665c2 to
24ec51b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.6.5→0.8.13Release Notes
TanStack/ai (@tanstack/ai-ollama)
v0.8.13Compare Source
Patch Changes
#862
86fbbdd- Emit aRUN_ERRORevent instead of throwing when the Ollama text adapter'schatStreamfails before streaming begins (e.g. the initialclient.chatcall is rejected because the host is unreachable). The error is now surfaced as a structured chunk — withmessage,code, and any availablerawEvent— so failures flow through the stream consistently with other adapters rather than escaping as an unhandled exception.Updated dependencies [
afba322,e7ad181]:v0.8.12Compare Source
Patch Changes
b628a4d,b628a4d]:v0.8.11Compare Source
Patch Changes
c1a8732]:v0.8.10Compare Source
Patch Changes
#844
a6cceba- Republish all packages with their compileddist/output.Releases
0.33.0–0.36.0were published without adist/directory: therelease workflow relied on an Nx-cached
buildwhose outputs were notmaterialized to disk before
changeset publishpacked the tarballs, andfiles: ["dist"]silently includes nothing whendist/is absent. Thepublished packages therefore contained only
src/, so every export(
./dist/esm/*.js) resolved to a missing file and the packages wereuninstallable.
The publish step now runs a fresh, cache-bypassing build of all packages
immediately before publishing, guaranteeing compiled artifacts are present in
every tarball.
Updated dependencies [
a6cceba]:v0.8.9Compare Source
Patch Changes
fbd3762]:v0.8.8Patch Changes
c04abd3]:v0.8.7Patch Changes
#480
eddfbbd- Bind tool calls to the assistant message in tool-first streams by setting AG-UI'sparentMessageIdonTOOL_CALL_START.When a provider streams a tool call before any text, the
StreamProcessorhad noactive assistant message to attach it to, so it created one under a temporary local id.
The later
TEXT_MESSAGE_STARTthen carried the real provider message id, forcing amid-stream id change — which destabilizes
UIMessage.idand can remount the messagesubtree in
useChat(React list keys, etc.). See #477.Every text adapter generates one stable assistant message id per stream and already uses
it for
TEXT_MESSAGE_START; they now also emit it asparentMessageIdonTOOL_CALL_START. The processor readschunk.parentMessageId(?? active assistant id)so the message is created with the correct id immediately and the subsequent
TEXT_MESSAGE_STARTmatches — no rename, no remount.Fixed across all adapters that emit
TOOL_CALL_START(Anthropic, OpenAI Responses +Chat Completions via
@tanstack/openai-base, OpenRouter, Gemini including theexperimental text-interactions adapter, and Ollama).
Updated dependencies [
31de22b]:v0.8.6Patch Changes
2cb0313,18e5f4d,21720dd,243b8fa]:v0.8.5Patch Changes
8fa6cc5,8fa6cc5]:v0.8.4Patch Changes
07aaf8b]:v0.8.2Patch Changes
ff267a5,570c08a,22c9b42,215b6b4,7d44569]:v0.8.1Patch Changes
5deda27]:v0.8.0Minor Changes
#660
6df32b5- BREAKING: Sampling options (temperature,topP,maxTokens) have moved off the root ofchat()/ai()/generate()and into provider-nativemodelOptions. There is no longer a generic root-level sampling surface — each provider accepts its own native keys, fully typed per model:modelOptions: { temperature, top_p, max_output_tokens }modelOptions: { temperature, top_p, max_tokens }modelOptions: { temperature, topP, maxOutputTokens }modelOptions: { temperature, top_p, max_tokens }modelOptions: { temperature, top_p, max_completion_tokens }modelOptions: { options: { temperature, top_p, num_predict } }(nested)modelOptions: { temperature, topP, maxCompletionTokens }Middleware no longer sees
temperature/topP/maxTokensas first-class fields onChatMiddlewareConfig; mutateconfig.modelOptions(with the provider-native keys above) instead.metadatais unaffected and stays at the root.The public
OllamaTextProviderOptionstype export has also been removed from@tanstack/ai-ollama.modelOptionsis now typed per model — use the exportedOllamaChatModelOptionsByNamemap (indexed by model name) or the underlyingChatRequestfrom theollamaSDK for arbitrary model strings.Migrate automatically with the codemod, which resolves the provider from the adapter and rewrites the keys for you:
pnpm codemod:move-sampling-to-model-options "src/**/*.{ts,tsx}"See the Sampling Options migration guide for details.
Patch Changes
6df32b5]:v0.7.1Patch Changes
5d6cd28]:v0.7.0Compare Source
Minor Changes
#242
c251038- Enhanced token usage reporting for every provider.TokenUsageis now the single canonical run-usage type. It is defined once in@tanstack/ai-event-client(the dependency-free leaf package) and re-exported by@tanstack/ai, so the two packages can no longer drift. It carries optionaldetailed breakdowns alongside the core token counts:
promptTokensDetails/completionTokensDetails(cached, reasoning, audio, and per-modality tokens),durationSecondsfor duration-billed models (e.g. Whisper transcription),providerUsageDetailsfor provider-specific metrics, andcost/costDetailsfor provider-reported cost — so a single
usageshape covers counts, detailedbreakdowns, and cost.
TokenUsageis generic over its provider details bag —TokenUsage<TProviderDetails = ProviderUsageDetails>— so adapters return astrongly-typed
providerUsageDetails(e.g.TokenUsage<AnthropicProviderUsageDetails>)while generic consumers keep the open-record default. The default,
ProviderUsageDetails(Record<string, NonNullable<unknown>>), is now exported anduses non-nullish values rather than
unknownsoTokenUsagestays assignable acrossJSON-serialization boundaries (e.g. TanStack Start server-fn return types). Each
provider's usage
extractor now returns
undefined(rather than fabricating zeroed totals) whenthe provider reports no usage object, so an absent
usageis distinguishablefrom a genuine zero-token run.
@tanstack/aistill exportsUsageTotalsas a@deprecatedalias ofTokenUsagefor backward compatibility; it will be removed in a future release.Detailed usage is extracted in one place per SDK surface: OpenAI-compatible
providers (OpenAI, Grok, Groq) share the extractors in
@tanstack/openai-base,while Anthropic, Gemini, Ollama, and OpenRouter normalize their own provider
usage. The devtools surface cached and reasoning token badges per iteration.
Usage is now unified across every modality, not just text/chat. Image, audio,
and text-to-speech results report the same canonical
TokenUsage(withper-modality breakdowns) instead of a minimal
inputTokens/outputTokensshape:ImageGenerationResult.usage,AudioGenerationResult.usage, and the newTTSResult.usageare now typed asTokenUsage. Breaking: consumers ofthese fields should read
promptTokens/completionTokensinstead ofinputTokens/outputTokens.@tanstack/ai-event-client'sImageUsageis nowa
@deprecatedalias ofTokenUsage.(
promptTokensDetails), Gemini image/audio/TTS now surface their fullusageMetadata(previously dropped), and OpenRouter image generation surfacesthe chat usage it already returns.
NaNtotals or discards duration-onlyusage; Anthropic defaults missing
output_tokensand no longer emits emptypromptTokensDetails/providerUsageDetailsobjects; OpenAI GPT-4otranscription reads the real audio/text input token breakdown and never falls
back to duration billing.
Cross-adapter usage parity fixes:
PromptTokensDetails/CompletionTokensDetailsgain adocumentTokensfield,and Gemini now surfaces
DOCUMENTmodality token counts (e.g. PDF inputs)instead of silently dropping them.
@tanstack/openai-base) nowsurfaces Predicted-Outputs
acceptedPredictionTokens/rejectedPredictionTokensunder
providerUsageDetails, matching the OpenRouter adapter (rejectedprediction tokens are billed).
/v1/stt) now reportsdurationSeconds, mirroring theWhisper-1 path in the OpenAI transcription adapter.
Patch Changes
c251038]:v0.6.24Compare Source
Patch Changes
c1ae8b9,a452ae8,8036b50]:v0.6.23Compare Source
Patch Changes
980ff9b,d5645cf]:v0.6.22Compare Source
Patch Changes
02f7d04]:v0.6.21Compare Source
Patch Changes
Refresh package README content and npm metadata for better discoverability. (#626)
Updated dependencies [
ebeb22e]:v0.6.20Compare Source
Patch Changes
ec1393d,188fe11]:v0.6.19Compare Source
Patch Changes
Tighten TypeScript safety: enable
noImplicitOverride, (#579)noFallthroughCasesInSwitch, anduseDefineForClassFieldsin theroot
tsconfig.json; add a typed-ESLint block scoped topackages/*/src/**that turns onno-floating-promises,no-misused-promises,await-thenable,switch-exhaustiveness-check,consistent-type-exports,prefer-readonly, andno-non-null-assertion(errors), plusno-explicit-any(warning).@ts-ignoreand@ts-nocheckaredisallowed in library source via
@typescript-eslint/ban-ts-comment,and
as unknown as <T>double-casts are blocked by ano-restricted-syntaxrule (escape hatches available with an inlinereason). Two flags from the original five-flag set —
noPropertyAccessFromIndexSignatureandexactOptionalPropertyTypes— were tried and rolled back: they produced ~500 lines of bracket-
access and conditional-spread churn without catching any real bugs,
and
exactOptionalPropertyTypeswould have forced consumers usingit themselves to deal with our internals' style preferences.
User-visible API surface is unchanged; this is a hardening pass to
keep streaming/agent-loop correctness and discriminated-union
exhaustiveness honest going forward. See issue #564.
Updated dependencies [
2ad137b]:v0.6.18Compare Source
Patch Changes
feat(ai):
systemPromptsaccept{ content, metadata }with adapter-inferred metadata typing (#575)chat({ systemPrompts })now accepts either a plain string (the existingshape — fully backward compatible) or
{ content, metadata }. Themetadatafield's type is inferred from the adapter via a new
TSystemPromptMetadatageneric onTextAdapter/BaseTextAdapter:@tanstack/ai-anthropicdeclaresAnthropicSystemPromptMetadata→users get
cache_controlautocomplete and type-checking onsystemPrompts[i].metadatafor Anthropic chats.OpenRouter, openai-base) inherit the default
never, which means themetadatafield carries no meaningful value at the call site —TypeScript only accepts
undefinedthere. Provider-foreign metadatathat reaches an adapter via JS /
as anyis silently dropped, neverwritten to the wire.
New exports:
@tanstack/ai:SystemPrompt,NormalizedSystemPrompttypes and thenormalizeSystemPrompts()helper adapters use to normalize the wideinput shape to
{ content, metadata? }before consumption.@tanstack/ai-anthropic:AnthropicSystemPromptMetadatainterface(currently exposes
cache_controlfor prompt caching).Internal:
TSystemPromptMetadata = nevergeneric onTextAdapter/BaseTextAdapter, surfaced via'~types'['systemPromptMetadata']for inference at the
chat()call site.metadata.cache_controland attaches it tothe corresponding
TextBlockParam.normalizeSystemPrompts()and join.contentfor their respectiveinstructions/system/systemInstructionfields. Foreign metadata that reaches them via JS/
as anyis dropped (never written to the wire).normalizeSystemPrompts()is the public API boundary and throwsTypeError(naming the offending index) for object-form entries whosecontentisn't a string — preventing literal"undefined"fromreaching the model on stale call sites.
tanstack.ai.system_prompt.metadataJSON span attribute whencaptureContent: trueand at least one entry carries metadata, soobservability backends can distinguish cache hit/miss for Anthropic.
@tanstack/ai-event-clientmirrors theSystemPromptshape locally(avoids a circular import) and projects metadata away on the devtools
wire — devtools UI still receives
Array<string>.Updated dependencies [
496db9c]:v0.6.17Compare Source
Patch Changes
2e0e2eb]:v0.6.16Compare Source
Patch Changes
v0.6.15Compare Source
Patch Changes
a9d1916,e810153]:v0.6.14Compare Source
Patch Changes
@tanstack/ai-openrouterfrom the shared OpenAI base. (#527)v0.6.13Compare Source
Patch Changes
87f305c]:v0.6.12Compare Source
Patch Changes
Internal refactor: every provider now delegates
getApiKeyFromEnv/generateId/transformNullsToUndefined/ModelMetahelpers to the new@tanstack/ai-utilspackage.ai-openaiandai-grokadditionally inherit OpenAI-compatible adapter base classes (Chat Completions / Responses text, image, summarize, transcription, TTS, video) from the new@tanstack/openai-basepackage;ai-groqkeeps its ownBaseTextAdapter-derived text adapter (Groq uses thegroq-sdk, not the OpenAI SDK) but consumes@tanstack/openai-base's schema converter and tool converters. The remaining providers (ai-anthropic,ai-gemini,ai-ollama,ai-openrouter,ai-fal,ai-elevenlabs) only consume@tanstack/ai-utilsbecause they speak provider-native protocols, not OpenAI-compatible ones. No breaking changes — all public APIs remain identical. (#409)Updated dependencies [
27c9aeb]:v0.6.11Compare Source
Patch Changes
a4e2c55,82078bd,b2d3cc1]:v0.6.10Compare Source
Patch Changes
refactor(ai-ollama): extract tool conversion into
src/tools/matching peer adapters (#465)Tool handling lived inline inside the text adapter with raw type casts. It is now split into a dedicated
tool-converter.ts/function-tool.tspair (mirroring the structure used byai-openai,ai-anthropic,ai-grok, andai-groq) and re-exported from the package index asconvertFunctionToolToAdapterFormatandconvertToolsToProviderFormat. Runtime behavior is unchanged.Updated dependencies [
54523f5,54523f5,af9eb7b,54523f5]:v0.6.9Compare Source
Patch Changes
Wire each adapter's text, summarize, image, speech, transcription, and video paths through the new
InternalLoggerfrom@tanstack/ai/adapter-internals:logger.request(...)before each SDK call,logger.provider(...)for every chunk received, andlogger.errors(...)in catch blocks. Migrates all pre-existing ad-hocconsole.*calls in adapter catch blocks (including the OpenAI and ElevenLabs realtime adapters) onto the structured logger. No adapter factory or config-shape changes. (#467)Updated dependencies [
c1fd96f]:v0.6.8Compare Source
Patch Changes
e32583e]:v0.6.7Compare Source
Patch Changes
Align stream output with
@tanstack/ai's AG-UI-compliant event shapes: emitREASONING_*events alongsideSTEP_*, threadthreadId/runIdthroughRUN_STARTED/RUN_FINISHED, and return flatRunErrorEventshape. Cast raw events through an internalasChunkhelper so they line up with the re-exported@ag-ui/coreEventTypeenum. No changes to adapter factory signatures or config shapes. (#474)Updated dependencies [
12d43e5]:v0.6.6Compare Source
Patch Changes
fix(ai, ai-openai, ai-gemini, ai-ollama): normalize null tool input to empty object (#430)
When a model produces a
tool_useblock with no input,JSON.parse('null')returnsnullwhich fails Zod schema validation and silently kills the agent loop. Normalize null/non-object parsed tool input to{}inexecuteToolCalls,ToolCallManager.completeToolCall,ToolCallManager.executeTools, and the OpenAI/Gemini/Ollama adapterTOOL_CALL_ENDemissions. The Anthropic adapter already had this fix.Updated dependencies [
c780bc1]:Configuration
📅 Schedule: (UTC)
* 0-3 * * 1)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.