github cloudflare/ai @cloudflare/tanstack-ai@0.1.8

latest release: workers-ai-provider@3.1.12
7 hours ago

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.

Don't miss a new ai release

NewReleases is sending notifications on new releases.