{"id":227,"date":"2026-02-13T00:00:00","date_gmt":"2026-02-13T00:00:00","guid":{"rendered":"https:\/\/wordpress.securinsight.ca\/index.php\/2026\/02\/13\/workers-agents-workers-ai-introducing-glm-4-7-flash-on-workers-ai-cloudflare-tanstack-ai-and-workers-ai-provider-v3-1-1-4\/"},"modified":"2026-02-13T00:00:00","modified_gmt":"2026-02-13T00:00:00","slug":"workers-agents-workers-ai-introducing-glm-4-7-flash-on-workers-ai-cloudflare-tanstack-ai-and-workers-ai-provider-v3-1-1-4","status":"publish","type":"post","link":"https:\/\/wordpress.securinsight.ca\/index.php\/2026\/02\/13\/workers-agents-workers-ai-introducing-glm-4-7-flash-on-workers-ai-cloudflare-tanstack-ai-and-workers-ai-provider-v3-1-1-4\/","title":{"rendered":"Workers, Agents, Workers AI &#8211; Introducing GLM-4.7-Flash on Workers AI, @cloudflare\/tanstack-ai, and workers-ai-provider v3.1.1"},"content":{"rendered":"<p>We&#8217;re excited to announce <strong>GLM-4.7-Flash<\/strong> on Workers AI, a fast and efficient text generation model optimized for multilingual dialogue and instruction-following tasks, along with the brand-new <a href=\"https:\/\/www.npmjs.com\/package\/@cloudflare\/tanstack-ai\" target=\"_blank\"><strong>@cloudflare\/tanstack-ai<\/strong><\/a> package and <a href=\"https:\/\/www.npmjs.com\/package\/workers-ai-provider\" target=\"_blank\"><strong>workers-ai-provider v3.1.1<\/strong><\/a>.<\/p>\n<p>You can now run AI agents entirely on Cloudflare. With GLM-4.7-Flash&#8217;s multi-turn tool calling support, plus full compatibility with TanStack AI and the Vercel AI SDK, you have everything you need to build agentic applications that run completely at the edge.<\/p>\n<h4>GLM-4.7-Flash \u2014 Multilingual Text Generation Model<\/h4>\n<p><a href=\"https:\/\/developers.cloudflare.com\/workers-ai\/models\/glm-4.7-flash\/\"><code>@cf\/zai-org\/glm-4.7-flash<\/code><\/a> is a multilingual model with a 131,072 token context window, making it ideal for long-form content generation, complex reasoning tasks, and multilingual applications.<\/p>\n<p><strong>Key Features and Use Cases:<\/strong><\/p>\n<ul>\n<li><strong>Multi-turn Tool Calling for Agents<\/strong>: Build AI agents that can call functions and tools across multiple conversation turns<\/li>\n<li><strong>Multilingual Support<\/strong>: Built to handle content generation in multiple languages effectively<\/li>\n<li><strong>Large Context Window<\/strong>: 131,072 tokens for long-form writing, complex reasoning, and processing long documents<\/li>\n<li><strong>Fast Inference<\/strong>: Optimized for low-latency responses in chatbots and virtual assistants<\/li>\n<li><strong>Instruction Following<\/strong>: Excellent at following complex instructions for code generation and structured tasks<\/li>\n<\/ul>\n<p>Use GLM-4.7-Flash through the <a href=\"https:\/\/developers.cloudflare.com\/workers-ai\/configuration\/bindings\/\">Workers AI binding<\/a> (<code>env.AI.run()<\/code>), the REST API at <code>\/run<\/code> or <code>\/v1\/chat\/completions<\/code>, <a href=\"https:\/\/developers.cloudflare.com\/ai-gateway\/\">AI Gateway<\/a>, or via <a href=\"https:\/\/developers.cloudflare.com\/workers-ai\/configuration\/ai-sdk\/\">workers-ai-provider<\/a> for the Vercel AI SDK.<\/p>\n<p>Pricing is available on the <a href=\"https:\/\/developers.cloudflare.com\/workers-ai\/models\/glm-4.7-flash\/\">model page<\/a> or <a href=\"https:\/\/developers.cloudflare.com\/workers-ai\/platform\/pricing\/\">pricing page<\/a>.<\/p>\n<h4>@cloudflare\/tanstack-ai v0.1.1 \u2014 TanStack AI adapters for Workers AI and AI Gateway<\/h4>\n<p>We&#8217;ve released <code>@cloudflare\/tanstack-ai<\/code>, a new package that brings Workers AI and AI Gateway support to <a href=\"https:\/\/tanstack.com\/ai\" target=\"_blank\">TanStack AI<\/a>. This provides a framework-agnostic alternative for developers who prefer TanStack&#8217;s approach to building AI applications.<\/p>\n<p><strong>Workers AI adapters<\/strong> support four configuration modes \u2014 plain binding (<code>env.AI<\/code>), plain REST, AI Gateway binding (<code>env.AI.gateway(id)<\/code>), and AI Gateway REST \u2014 across all capabilities:<\/p>\n<ul>\n<li><strong>Chat<\/strong> (<code>createWorkersAiChat<\/code>) \u2014 Streaming chat completions with tool calling, structured output, and reasoning text streaming.<\/li>\n<li><strong>Image generation<\/strong> (<code>createWorkersAiImage<\/code>) \u2014 Text-to-image models.<\/li>\n<li><strong>Transcription<\/strong> (<code>createWorkersAiTranscription<\/code>) \u2014 Speech-to-text.<\/li>\n<li><strong>Text-to-speech<\/strong> (<code>createWorkersAiTts<\/code>) \u2014 Audio generation.<\/li>\n<li><strong>Summarization<\/strong> (<code>createWorkersAiSummarize<\/code>) \u2014 Text summarization.<\/li>\n<\/ul>\n<p><strong>AI Gateway adapters<\/strong> route requests from third-party providers \u2014 OpenAI, Anthropic, Gemini, Grok, and OpenRouter \u2014 through Cloudflare AI Gateway for caching, rate limiting, and unified billing.<\/p>\n<p>To get started:<\/p>\n<div>\n<figure>\n<pre data-language=\"sh\"><code class=\"language-sh\"><div><div><span>npm<\/span><span> <\/span><span>install<\/span><span> <\/span><span>@cloudflare\/tanstack-ai<\/span><span> <\/span><span>@tanstack\/ai<\/span><\/div><\/div><\/code><\/pre>\n<div>\n<div><\/div>\n<\/div>\n<\/figure>\n<\/div>\n<h4>workers-ai-provider v3.1.1 \u2014 transcription, speech, reranking, and reliability<\/h4>\n<p>The Workers AI provider for the <a href=\"https:\/\/ai-sdk.dev\/\" target=\"_blank\">Vercel AI SDK<\/a> now supports three new capabilities beyond chat and image generation:<\/p>\n<ul>\n<li><strong>Transcription<\/strong> (<code>provider.transcription(model)<\/code>) \u2014 Speech-to-text with automatic handling of model-specific input formats across binding and REST paths.<\/li>\n<li><strong>Text-to-speech<\/strong> (<code>provider.speech(model)<\/code>) \u2014 Audio generation with support for voice and speed options.<\/li>\n<li><strong>Reranking<\/strong> (<code>provider.reranking(model)<\/code>) \u2014 Document reranking for RAG pipelines and search result ordering.<\/li>\n<\/ul>\n<div>\n<figure>\n<pre data-language=\"typescript\"><code class=\"language-typescript\"><div><div><span>import <\/span><span>{<\/span><span><span> <\/span><span>createWorkersAI<\/span><span> <\/span><\/span><span>}<\/span><span> from <\/span><span>\"workers-ai-provider\"<\/span><span>;<\/span><\/div><\/div><div><div><span>import <\/span><span>{<\/span><\/div><\/div><div><div><span><span>  <\/span><\/span><span>experimental_transcribe<\/span><span>,<\/span><\/div><\/div><div><div><span><span>  <\/span><\/span><span>experimental_generateSpeech<\/span><span>,<\/span><\/div><\/div><div><div><span><span>  <\/span><\/span><span>rerank<\/span><span>,<\/span><\/div><\/div><div><div><span>}<\/span><span> from <\/span><span>\"ai\"<\/span><span>;<\/span><\/div><\/div><div><div>\n<\/div><\/div><div><div><span>const<\/span><span> <\/span><span>workersai<\/span><span> <\/span><span>=<\/span><span> <\/span><span>createWorkersAI<\/span><span>(<\/span><span>{<\/span><span> binding<\/span><span>:<\/span><span> <\/span><span>env<\/span><span>.<\/span><span>AI<\/span><span> <\/span><span>}<\/span><span>)<\/span><span>;<\/span><\/div><\/div><div><div>\n<\/div><\/div><div><div><span>const<\/span><span> <\/span><span>transcript<\/span><span> <\/span><span>=<\/span><span> <\/span><span>await<\/span><span> <\/span><span>experimental_transcribe<\/span><span>(<\/span><span>{<\/span><\/div><\/div><div><div><span><span>  <\/span><\/span><span>model<\/span><span>:<\/span><span> <\/span><span>workersai<\/span><span>.<\/span><span>transcription<\/span><span>(<\/span><span>\"@cf\/openai\/whisper-large-v3-turbo\"<\/span><span>)<\/span><span>,<\/span><\/div><\/div><div><div><span><span>  <\/span><\/span><span>audio<\/span><span>:<\/span><span> <\/span><span>audioData<\/span><span>,<\/span><\/div><\/div><div><div><span><span>  <\/span><\/span><span>mediaType<\/span><span>:<\/span><span> <\/span><span>\"audio\/wav\"<\/span><span>,<\/span><\/div><\/div><div><div><span>}<\/span><span>)<\/span><span>;<\/span><\/div><\/div><div><div>\n<\/div><\/div><div><div><span>const<\/span><span> <\/span><span>speech<\/span><span> <\/span><span>=<\/span><span> <\/span><span>await<\/span><span> <\/span><span>experimental_generateSpeech<\/span><span>(<\/span><span>{<\/span><\/div><\/div><div><div><span><span>  <\/span><\/span><span>model<\/span><span>:<\/span><span> <\/span><span>workersai<\/span><span>.<\/span><span>speech<\/span><span>(<\/span><span>\"@cf\/deepgram\/aura-1\"<\/span><span>)<\/span><span>,<\/span><\/div><\/div><div><div><span><span>  <\/span><\/span><span>text<\/span><span>:<\/span><span> <\/span><span>\"Hello world\"<\/span><span>,<\/span><\/div><\/div><div><div><span><span>  <\/span><\/span><span>voice<\/span><span>:<\/span><span> <\/span><span>\"asteria\"<\/span><span>,<\/span><\/div><\/div><div><div><span>}<\/span><span>)<\/span><span>;<\/span><\/div><\/div><div><div>\n<\/div><\/div><div><div><span>const<\/span><span> <\/span><span>ranked<\/span><span> <\/span><span>=<\/span><span> <\/span><span>await<\/span><span> <\/span><span>rerank<\/span><span>(<\/span><span>{<\/span><\/div><\/div><div><div><span><span>  <\/span><\/span><span>model<\/span><span>:<\/span><span> <\/span><span>workersai<\/span><span>.<\/span><span>reranking<\/span><span>(<\/span><span>\"@cf\/baai\/bge-reranker-base\"<\/span><span>)<\/span><span>,<\/span><\/div><\/div><div><div><span><span>  <\/span><\/span><span>query<\/span><span>:<\/span><span> <\/span><span>\"What is machine learning?\"<\/span><span>,<\/span><\/div><\/div><div><div><span><span>  <\/span><\/span><span>documents<\/span><span>:<\/span><span> [<\/span><span>\"ML is a branch of AI.\"<\/span><span>,<\/span><span> <\/span><span>\"The weather is sunny.\"<\/span><span>]<\/span><span>,<\/span><\/div><\/div><div><div><span>}<\/span><span>)<\/span><span>;<\/span><\/div><\/div><\/code><\/pre>\n<div>\n<div><\/div>\n<\/div>\n<\/figure>\n<\/div>\n<p>This release also includes a comprehensive reliability overhaul (v3.0.5):<\/p>\n<ul>\n<li><strong>Fixed streaming<\/strong> \u2014 Responses now stream token-by-token instead of buffering all chunks, using a proper <code>TransformStream<\/code> pipeline with backpressure.<\/li>\n<li><strong>Fixed tool calling<\/strong> \u2014 Resolved issues with tool call ID sanitization, conversation history preservation, and a heuristic that silently fell back to non-streaming mode when tools were defined.<\/li>\n<li><strong>Premature stream termination detection<\/strong> \u2014 Streams that end unexpectedly now report <code>finishReason: \"error\"<\/code> instead of silently reporting <code>\"stop\"<\/code>.<\/li>\n<li><strong>AI Search support<\/strong> \u2014 Added <code>createAISearch<\/code> as the canonical export (renamed from AutoRAG). <code>createAutoRAG<\/code> still works with a deprecation warning.<\/li>\n<\/ul>\n<p>To upgrade:<\/p>\n<div>\n<figure>\n<pre data-language=\"sh\"><code class=\"language-sh\"><div><div><span>npm<\/span><span> <\/span><span>install<\/span><span> <\/span><span>workers-ai-provider@latest<\/span><span> <\/span><span>ai<\/span><\/div><\/div><\/code><\/pre>\n<div>\n<div><\/div>\n<\/div>\n<\/figure>\n<\/div>\n<h4>Resources<\/h4>\n<ul>\n<li><a href=\"https:\/\/www.npmjs.com\/package\/@cloudflare\/tanstack-ai\" target=\"_blank\">@cloudflare\/tanstack-ai on npm<\/a><\/li>\n<li><a href=\"https:\/\/www.npmjs.com\/package\/workers-ai-provider\" target=\"_blank\">workers-ai-provider on npm<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/cloudflare\/ai\" target=\"_blank\">GitHub repository<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>We&#8217;re excited to announce GLM-4.7-Flash on Workers AI, a fast and efficient text generation model optimized for multilingual dialogue and instruction-following tasks, along with the brand-new @cloudflare\/tanstack-ai package and workers-ai-provider v3.1.1. You can now run AI agents entirely on Cloudflare. With GLM-4.7-Flash&#8217;s multi-turn tool calling support, plus full compatibility with TanStack AI and the Vercel [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-227","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/posts\/227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/comments?post=227"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/posts\/227\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/media?parent=227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/categories?post=227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/tags?post=227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}