Qwen 3.8 27B Lands on Cloudflare Workers AI: Vision, Reasoning, and 262K Context at the Edge

On August 17, 2026 — three days after Cloudflare shipped DeepSeek V4 Flash and Pro — Workers AI added Qwen 3.8 27B under the model handle @cf/qwen/qwen3.8-27b. It is Alibaba's 27-billion-parameter vision-language model with reasoning, function calling, and a 262,144-token context window, billed at $0.45 / M input and $3.20 / M output. This article walks through what Cloudflare actually shipped, the verified edge pricing in neurons and dollars, the realistic agent use cases, and how the Workers AI route compares to calling Qwen directly on Alibaba Bailian or through an aggregator like FreeModel.

🌍 Quick verdict: Workers AI Qwen 3.8 27B is the cheapest path to run a 27B vision model with thinking and tool use near an existing Worker, with zero infrastructure, AI Gateway observability, and the standard 300 req/min text-gen limit. The trade-off: it sits between cheaper text-only Llamas on Workers AI and the more expensive DeepSeek V4 Pro on the same platform, and Alibaba still ships new Qwen variants on Bailian first.

What shipped on August 17

Cloudflare's changelog for August 17, 2026 confirms a single new model id: @cf/qwen/qwen3.8-27b, tagged "Cloudflare-hosted" with Vision, Function calling, and Reasoning badges. The model page describes it as "a 27-billion-parameter instruction-tuned language model from Alibaba's Qwen family, designed for vision, efficient general-purpose text generation and agentic workloads." Unlike the frontier-only Kimi K2.6 / GLM-5.2 / DeepSeek V4 tier, Qwen 3.8 27B is not on the restricted list — it runs under the standard Text Generation rate limit (300 req/min) and can use the 10,000 free Neurons per day on the Workers Free tier.

The model accepts both text and image input (multimodal = "Image-Text-to-Text" in Cloudflare's taxonomy), supports a thinking/reasoning mode for step-by-step problem solving, and exposes function calling so agents can invoke tools and APIs across multiple conversation turns. The 262,144-token context window puts Qwen 3.8 27B in the same long-context tier as Mistral Small 3.1 and GLM 4.7 Flash on Workers AI — comfortably long enough for a full codebase chunk, a long agent trajectory, or a multi-chapter RAG passage — but well below the 1M context that DeepSeek V4 Pro/Flash hold on the same platform.

Pricing in dollars and neurons

Workers AI presents per-model unit-based pricing but still bills internally in Neurons. The published table for @cf/qwen/qwen3.8-27b on August 18, 2026 is:

TierPer M tokensPer M neurons
Input$0.4540,909
Output$3.20290,909

Two details worth flagging:

  1. No cached-input line. Unlike DeepSeek V4 Pro ($0.044/M cached), Kimi K2.6 ($0.10/M cached), or GLM-5.2 ($0.26/M cached), Qwen 3.8 27B does not have a published prompt-cache rate. If your workload is mostly repeated-system-prompt-heavy, the lack of caching will dominate your cost — DeepSeek V4 Pro on Workers AI can come out cheaper than Qwen 3.8 27B once caching is enabled, despite its higher headline rate.
  2. Free tier counts. The 10,000 Neurons per day free tier maps to about 244K input tokens or 34K output tokens per day at Qwen 3.8 27B's neuron rate — enough for a handful of agent calls, not enough for production traffic. Paid usage above the free tier is $0.011 per 1,000 Neurons.

Where Qwen 3.8 27B sits in the Workers AI lineup

Comparing the per-M input rates for the vision-capable and reasoning-capable models on Workers AI as of August 18, 2026:

ModelInput / MOutput / MContextNotes
@cf/qwen/qwen3.8-27b$0.45$3.20262Kvision + reasoning + tools
@cf/deepseek-ai/deepseek-v4-flash-0731$0.44$1.321Mcached $0.014, paid plan
@cf/deepseek-ai/deepseek-v4-pro-0813$1.32$3.961Mcached $0.044, paid plan
@cf/zai-org/glm-4.7-flash$0.06$0.40128Kbudget text-only
@cf/mistralai/mistral-small-3.1-24b-instruct$0.35$0.55128Kno vision
@cf/meta/llama-3.2-11b-vision-instruct$0.049$0.676128Kcheapest vision option

The decision tree for an agent workload on Workers AI in August 2026 narrows to three options: (a) Llama 3.2 11B Vision at $0.049 / $0.676 per M if you can live with a smaller context and 11B parameters and don't need thinking-mode; (b) Qwen 3.8 27B at $0.45 / $3.20 per M when you need vision + reasoning + function calling + a 262K context in a single model; (c) DeepSeek V4 Flash at $0.44 / $1.32 per M when you can drop vision but need the full 1M context and prompt caching for repeated-system-prompt agents.

How to call it

Three surfaces, all documented by Cloudflare.

1. Workers AI binding (preferred for in-Worker code).

export default {
  async fetch(request, env) {
    const response = await env.AI.run('@cf/qwen/qwen3.8-27b', {
      messages: [
        { role: 'system', content: 'You are a vision-aware agent. Use tools when needed.' },
        { role: 'user', content: [
          { type: 'text', text: 'What is in this image and what should I do next?' },
          { type: 'image_url', image_url: { url: 'https://example.com/upload/photo.jpg' } }
        ]}
      ],
      max_tokens: 800,
    });
    return Response.json(response);
  }
};

2. REST API at /ai/run.

curl -X POST "https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/ai/run/@cf/qwen/qwen3.8-27b" \
  -H "Authorization: Bearer $CF_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","content":"Summarise the third chapter of this codebase."}],"max_tokens":512}'

3. OpenAI-compatible endpoint (/ai/v1/chat/completions). Same shape as the OpenAI Chat Completions API — useful when you already speak the OpenAI SDK or want to drop Qwen 3.8 27B into a Vercel AI SDK, LangChain, or LlamaIndex pipeline without rewriting:

import OpenAI from 'openai';
const client = new OpenAI({
  apiKey: process.env.CF_API_TOKEN,
  baseURL: `https://api.cloudflare.com/client/v4/accounts/${'$'}{process.env.CF_ACCOUNT_ID}/ai/v1`,
});
const resp = await client.chat.completions.create({
  model: '@cf/qwen/qwen3.8-27b',
  messages: [{ role: 'user', content: 'Why is the Workers AI free tier 10,000 neurons per day?' }],
});
console.log(resp.choices[0].message.content);

All three surfaces support AI Gateway in front of them — the gateway's unified-billing mode lets you load Neurons or prepaid credits once and route any model through it, with logs, caching, and rate-limit controls.

What Qwen 3.8 27B is actually good at

The 27B parameter count and instruction tuning land Qwen 3.8 27B in the "generalist with vision" tier — it is not a frontier reasoning model in the Kimi K2.6 / GLM-5.2 / DeepSeek V4 Pro sense, but it is competitive on the workloads that most production agents actually hit:

  • Image-grounded chat and OCR-heavy prompts. Vision + 262K context means a single request can hold a screenshot, a PDF page rendered as image, and a long-form instruction set without truncation. The cheaper Llama 3.2 11B Vision option has the same shape but with less reasoning depth on multi-step instructions.
  • Function-calling agents with a small tool catalog. Five to ten tools, structured JSON output, conversational repair. The function-calling API mirrors the OpenAI tool schema, so any agent harness that already supports tools will accept Qwen 3.8 27B with no glue code.
  • Long-context RAG without the DeepSeek 1M price tag. 262K tokens is enough for a 150K-token chunked code repo plus a multi-page spec; you give up the prompt-cache discount that DeepSeek V4 Flash gets, but you also avoid DeepSeek's restricted-list friction.
  • Thinking mode for step-by-step tool chains. Cloudflare's model page flags "Reasoning: Yes" and supports thinking mode — useful when an agent needs to deliberate before calling a tool, but without the heavyweight cost profile of a Kimi K2.6 or DeepSeek V4 Pro.

Workers AI Qwen 3.8 27B vs Alibaba Bailian direct

Alibaba's official Bailian (Model Studio) platform — see our Bailian API guide for the full endpoint reference — sells Qwen 3.8 access too — and it generally ships new variants first, since Qwen is Alibaba's own model family. The trade-off between the two routes is straightforward:

DimensionWorkers AI @cf/qwen/qwen3.8-27bAlibaba Bailian Qwen 3.8
Pricing$0.45 / $3.20 per MBailian per-token ¥; Qwen 3.8 free tier + paid tier
Context262,144 tokensSame Qwen 3.8 context window
Vision / ToolsYes / YesYes / Yes
Free tier10K neurons/day (≈ 244K input tokens)Bailian free quota + DashScope free credits
ObservabilityAI Gateway logs, cache, rate-limitBailian console + DashScope tracing
China routingCloudflare edge (works from China-adjacent)Native China + global endpoint
New variants first~1-3 weeks after BailianYes (Qwen family)
Best forWorkers + AI Gateway workflowsLatest Qwen variant, China-native, cheapest ¥/$

If you are already running on Cloudflare Workers and need vision + reasoning + tools in one model, Workers AI Qwen 3.8 27B is the path of least resistance: the binding is a one-line import, AI Gateway gives you logs and caching for free, and the model runs on the standard 300 req/min text-gen limit without the frontier-model friction. If you need the absolute latest Qwen variant, the cheapest CNY/USD pricing, or a model that is independently deployed in China, Bailian wins.

Limits and friction

Three limits worth knowing before you wire Qwen 3.8 27B into a production Worker:

  1. Standard 300 req/min text-generation rate. No elevated frontier-model limit, no 50 req/min cap — you get the platform-default 300 requests per minute for text generation. Bursty workloads above 300 rpm will see 429s; AI Gateway's rate-limit rules can smooth this if you front the model with a gateway.
  2. Free tier is tiny. 10,000 neurons per day maps to about 244K input tokens at $0.45/M — enough for a handful of dev test calls, not enough for staging traffic. Move to the Workers Paid plan ($0.011 / 1,000 neurons) before you put this in a user-facing flow.
  3. No cached-input rate. Unlike the DeepSeek V4 and Kimi K2.6 entries on Workers AI, Qwen 3.8 27B has no published prompt-cache rate. Repeated-system-prompt agents will pay the full $0.45/M input every call — this is the single biggest reason to prefer DeepSeek V4 Flash on Workers AI for high-volume agent workloads with stable system prompts.

FAQ

Is Qwen 3.8 27B the same as the Qwen 3 Max flagship? No. Qwen 3.8 27B is a 27B-parameter instruction-tuned vision-language model; the Qwen 3 Max (and Qwen 3.8 Max) flagship is hundreds of billions of parameters. Qwen 3.8 27B is the edge-tier model designed to fit on a single GPU with vision + reasoning + tools; the Max tier is for the heaviest workloads and ships only on Bailian and partner clouds. The Qwen 3.8 family released July 19, 2026 on Bailian, and Workers AI picked up the 27B variant on August 17.

Can I use AI Gateway caching with Qwen 3.8 27B? Yes — AI Gateway's universal caching layer sits in front of any Workers AI model regardless of whether the model itself has a cached-input rate. You will pay the model rate ($0.45 / $3.20) but skip repeated-token bill on cache hits, which mostly helps when system prompts are large and identical across requests. For maximum savings, route the model through a gateway with unified-billing credits.

Does Qwen 3.8 27B support JSON mode and structured output? Yes. Workers AI exposes a JSON Mode beta that works across supported models; pair it with function calling for strict-schema agent output.

Will Cloudflare add a cached-input rate later? Workers AI's August 18, 2026 pricing page lists cached-input lines only for DeepSeek V4 Pro / Flash, GLM-5.2, and Kimi K2.6 / K2.7-code. Newer Qwen variants may pick up caching in a later revision; for now, budget as if every input token is paid at the full input rate.

Bottom line

Workers AI Qwen 3.8 27B is the cheapest Vision + Reasoning + Function-calling model on the platform for workloads that don't need the 1M context or the prompt-cache discount of DeepSeek V4. At $0.45 / $3.20 per M, it sits below DeepSeek V4 Pro ($1.32 / $3.96) and well above Llama 3.2 11B Vision ($0.049 / $0.676). The 262K context and free-tier Neurons allocation make it a strong default for in-Worker agent loops that already speak the OpenAI Chat Completions API and want zero new infrastructure. If you are choosing between Qwen 3.8 27B on Workers AI and the Bailian direct endpoint, the rule is simple: pick Workers AI when you want to stay inside Cloudflare's stack; pick Bailian when you want the latest Qwen variant or the cheapest CNY/USD pricing. The official Cloudflare Qwen 3.8 27B model page carries the live pricing, neuron conversion, and OpenAI-compatible endpoint reference.

For a quick deployable reference, the binding snippet above plus the OpenAI-compatible endpoint will cover most agent harnesses. If you need a multi-vendor abstraction that already wires Qwen, DeepSeek, OpenAI, Anthropic, and Google behind one OpenAI-compatible key, FreeModel is the simplest handoff: one dashboard, one billing relationship, no per-vendor glue code.