Qwen4-35B-A3B now available on AI Gateway
This design is well-suited to long documents, large codebases, and long-running agent sessions — use cases where context accumulates over many turns or steps.
By Dillip Chowdary • Dec 05, 2026 • Source: Vercel Blog

At a glance
- Model
- Qwen4-35B-A3B from Alibaba
- Total parameters
- 35 billion (3B active per token)
- License
- Apache 2.0
- Context window
- 1 million tokens
- Input
- Text, image, video
- Platform
- Vercel AI Gateway
In this post
Vercel added Qwen4-35B-A3B from Alibaba to its AI Gateway, making it available through a unified API alongside other language models, as described in Vercel Blog's report. Qwen4-35B-A3B is the first open-weight model in the Qwen4 series, released under the Apache 2.0 license.
The model is a mixture-of-experts architecture with 35 billion total parameters but approximately 3 billion active per token, making it faster and cheaper to run than a dense model of comparable total size. It is built on the same architecture and training techniques as Qwen4-Max. Developers who already use the Vercel AI SDK or the AI Gateway can access it by passing alibaba/qwen4-35b-a3b as the model name with no other configuration changes.
0135B total, 3B active, Apache 2.0 license
| Attribute | Value |
|---|---|
| Total parameters | 35 billion |
| Active parameters per token | ~3 billion |
| Architecture | Mixture-of-experts |
| Context window | 1 million tokens |
| License | Apache 2.0 |
| Input modalities | Text, image, video |
The mixture-of-experts design means only a fraction of the model's parameters are activated for any given token, reducing compute cost relative to a fully dense 35B model. The 1 million token context window and support for text, image, and video input place it in the range of frontier-class models for long-document and multimodal tasks while remaining open-weight and self-hostable.
02Hybrid attention keeps long contexts fast
Qwen4-35B-A3B uses a hybrid of linear attention and sparse attention. Linear attention reduces the computational cost of processing long inputs compared to standard quadratic-scaling self-attention, and the sparse attention component maintains quality on tasks that require precise retrieval from earlier context. The result, according to the Vercel changelog, is that long inputs are fast to process and their KV cache stays small.
This design is well-suited to long documents, large codebases, and long-running agent sessions — use cases where context accumulates over many turns or steps. Compared to prior Qwen open models, Qwen4-35B-A3B shows improvements on multi-step agent tasks, professional knowledge work, and coding for visual output such as frontend development, 3D modeling, and games. The model's thinking output is also described as more concise, meaning tasks complete in fewer tokens.
03Using Qwen4-35B-A3B via the Vercel AI SDK
To call the model from the Vercel AI SDK, pass alibaba/qwen4-35b-a3b as the model identifier:
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
```javascript
import { streamText } from 'ai';The same model identifier works with the OpenAI-compatible Chat Completions API endpoint on AI Gateway. No separate SDK or API key configuration is needed beyond what is already set up for other AI Gateway models.
04Setup for Claude Code, Codex, Cursor, and other agents
To use Qwen4-35B-A3B in AI coding agents that support AI Gateway, install the latest Vercel CLI and run the setup command:
npx vercel ai-gateway setupAfter setup, select alibaba/qwen4-35b-a3b in the agent's model picker. Vercel provides a coding agents guide with per-agent instructions for Claude Code, Codex, Cursor, and others. A model playground is also available to test the model before integrating it into a production workflow.
05AI Gateway pricing and infrastructure
AI Gateway reflects provider pricing with no markup and does not charge a platform fee on inference, including for Bring Your Own Key requests. For Qwen4-35B-A3B, this means developers pay Alibaba's model pricing rather than a Vercel premium.
The gateway includes usage and cost tracking, configurable retries and failover, Zero Data Retention support, budget controls per API key, custom routing rules, and performance optimizations targeting higher uptime than individual provider endpoints. The full list of language models available on AI Gateway is maintained in the Vercel documentation.
Qwen4-35B-A3B joins other open-weight models on AI Gateway alongside proprietary frontier models from Anthropic, OpenAI, and Google. Because Alibaba released it under Apache 2.0, developers can also run it locally or in their own cloud infrastructure without usage restrictions, making the AI Gateway route one option among several rather than the only path to the model.
The Apache 2.0 license permits commercial use without royalties or distribution requirements. Because the gateway normalizes all models behind a single API, switching between Qwen4-35B-A3B and other models requires changing only the model name string in the call — no SDK changes, no separate key management, and no rewriting of the application logic surrounding the prompt.
This interchangeability is particularly useful during evaluation, when developers compare multiple models on the same workload before committing to one for production. Pricing: Provider pricing, no Vercel markup
Frequently asked questions
What is Qwen4-35B-A3B?
Qwen4-35B-A3B is a mixture-of-experts model from Alibaba with 35 billion total parameters and approximately 3 billion active per token. It supports a 1 million token context window and accepts text, image, and video input. It is the first open-weight model in the Qwen4 series, released under Apache 2.0.
How do I use Qwen4-35B-A3B on Vercel AI Gateway?
Pass alibaba/qwen4-35b-a3b as the model name in the Vercel AI SDK or the OpenAI-compatible Chat Completions API. For coding agents like Claude Code or Cursor, run npx vercel ai-gateway setup and select the model in the agent's configuration.
Does Vercel charge extra for using Qwen4-35B-A3B on AI Gateway?
No. AI Gateway reflects provider pricing with no markup and does not charge a platform fee on inference, including for Bring Your Own Key requests.
What is Qwen4-35B-A3B better at than earlier Qwen open models?
The model shows improvements on long, multi-step agent tasks, professional knowledge work, and coding for visual output such as frontend development, 3D modeling, and games. Its thinking output is also more concise, meaning tasks use fewer tokens.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement