Skip to content

Releases: cloudflare/ai

@cloudflare/tanstack-ai@0.1.9

29 Apr 17:40
630180b

Choose a tag to compare

Patch Changes

  • #518 4358cc1 Thanks @zackarychapple! - Widen @tanstack/ai peer dependency and optional adapter ranges to accept newer 0.x releases (up to but not including 1.0.0). Previously the caret ranges on pre-1.0 versions resolved to a single minor (e.g. ^0.8.0 only allowed >=0.8.0 <0.9.0), causing unmet-peer warnings when consumers installed @tanstack/ai@0.14.0 and matching adapter versions.

workers-ai-provider@3.1.13

28 Apr 21:28
30c7b28

Choose a tag to compare

Patch Changes

  • #510 dfd2cb4 Thanks @Specy! - Map inputTokens.cacheRead and inputTokens.noCache from Workers AI's usage.prompt_tokens_details.cached_tokens instead of always reporting them as undefined. This makes prompt-cache hits visible to consumers that compute pricing or telemetry from LanguageModelV3Usage (generateText/streamText result.usage).

    cached_tokens is treated as cacheRead; cacheWrite remains undefined because the OpenAI-style usage shape Workers AI returns does not distinguish cache reads from writes.

    Closes #509.

workers-ai-provider@3.1.12

23 Apr 13:51
1f97013

Choose a tag to compare

Patch Changes

  • #504 e9b2a9a Thanks @threepointone! - Forward reasoning_effort and chat_template_kwargs onto binding.run(model, inputs)'s inputs object instead of silently dropping them into the options arg / REST query string. This fixes reasoning models (GLM-4.7-flash, Kimi K2.5/K2.6, GPT-OSS, QwQ) burning the entire output token budget on chain-of-thought with no visible content.

    Both settings-level and per-call usage are supported:

    // Settings-level
    const model = workersai("@cf/zai-org/glm-4.7-flash", {
    	reasoning_effort: "low",
    	chat_template_kwargs: { enable_thinking: false },
    });
    
    // Per-call (overrides settings)
    await generateText({
    	model,
    	prompt,
    	providerOptions: {
    		"workers-ai": { reasoning_effort: "low" },
    	},
    });

    reasoning_effort: null is preserved as-is (explicit "disable reasoning" signal). The two fields are also typed directly on WorkersAIChatSettings.

    Closes #501.

@cloudflare/tanstack-ai@0.1.8

23 Apr 13:51
1f97013

Choose a tag to compare

Patch Changes

  • #505 f43f6f0 Thanks @threepointone! - Add passthrough for reasoning_effort and chat_template_kwargs in createWorkersAiChat. Pass them per-call through modelOptions:

    const adapter = createWorkersAiChat("@cf/zai-org/glm-4.7-flash", {
    	binding: env.AI,
    });
    
    chat({
    	adapter,
    	messages,
    	modelOptions: {
    		reasoning_effort: "low",
    		chat_template_kwargs: { enable_thinking: false },
    	},
    });

    Previously these fields were silently dropped, which could cause reasoning models (GLM-4.7-flash, Kimi K2.5/K2.6, GPT-OSS) to burn the entire output token budget on chain-of-thought with no visible content. They now reach binding.run(model, inputs) at the inputs level as required by Workers AI.

    A new WorkersAiTextModelOptions type is exported from @cloudflare/tanstack-ai and @cloudflare/tanstack-ai/adapters/workers-ai.

    Closes #503.

workers-ai-provider@3.1.11

15 Apr 21:05
295ffc9

Choose a tag to compare

Patch Changes

  • #494 ed6112a Thanks @threepointone! - Emit tool-input-end and tool-call events eagerly when streaming multiple tool calls, instead of deferring all of them to stream close. Previously, all tool calls appeared "in progress" simultaneously because tool-input-end was only emitted in flush(). Now each tool call is closed as soon as the next one starts or a null finalization chunk is received, matching the behavior of other AI SDK providers.

workers-ai-provider@3.1.10

05 Apr 12:42
21a1619

Choose a tag to compare

Patch Changes

  • #480 1c6bdad Thanks @threepointone! - Add optional fetch parameter to credentials mode for request interception and testing. Available when using accountId + apiKey (not with bindings). Matches the pattern used by @ai-sdk/openai and @ai-sdk/anthropic.

workers-ai-provider@3.1.9

02 Apr 08:17
2c1f8d3

Choose a tag to compare

Patch Changes

ai-gateway-provider@3.1.3

02 Apr 08:17
2c1f8d3

Choose a tag to compare

Patch Changes

@cloudflare/tanstack-ai@0.1.7

02 Apr 08:17
2c1f8d3

Choose a tag to compare

Patch Changes

workers-ai-provider@3.1.8

25 Mar 08:47
525b4ad

Choose a tag to compare

Patch Changes