cloudflare/ai @cloudflare/tanstack-ai@0.1.10
cloudflare/ai
Captured source
source ↗@cloudflare/tanstack-ai@0.1.10
Repository: cloudflare/ai
Tag: @cloudflare/tanstack-ai@0.1.10
Published: 2026-06-16T10:01:41Z
Prerelease: no
Release notes:
Patch Changes
- #570 `104c4a7` Thanks @threepointone! - Update for the latest
@tanstack/aiadapter API and refresh Workers AI model references.
- Use the new provider summarize factory functions (
createAnthropicSummarize,createGeminiSummarize,createGrokSummarize,createOpenaiSummarize,createOpenRouterSummarize) instead of the removed*SummarizeAdapterclasses, and give the gatewaycreate*Summarizewrappers explicitAnySummarizeAdapterreturn types so declaration files generate cleanly. - Migrate the Workers AI streaming adapter to the
EventTypeenum and the updatedTextOptionsshape (sampling knobs such astemperature/max_tokensnow flow throughmodelOptions;systemPromptsacceptsSystemPromptobjects). - Align the image, transcription, and TTS adapters with the new
(model, config?)base-adapter constructor signature. - Update default/example Workers AI model references to current models (
@cf/google/gemma-4-26b-a4b-it,@cf/moonshotai/kimi-k2.7-code), replacing deprecated ones.
- #572 `667873f` Thanks @threepointone! - Fix broken streamed tool calls in the Workers AI adapter (#523).
Some Workers AI models stream a tool call's argument fragments before the function name arrives. The adapter buffers those fragments while waiting for the name (it must, because TanStack AI's StreamProcessor reads the tool name only once, from TOOL_CALL_START), but it previously dropped the buffered prefix and forwarded only the post-name fragment. The result was a tool-call message part with truncated/empty arguments (and, in earlier versions, a missing name), so tool dispatch silently failed.
The adapter now tracks how many argument characters have been emitted and flushes any buffered fragments via TOOL_CALL_ARGS as soon as TOOL_CALL_START is emitted, guaranteeing the full argument string and the tool name reach the consumer regardless of the order in which the model streams name and arguments.
Notability
notability 4.0/10Minor version release of an early-stage package.