Skip to content
Dashboard

Qwen 3 Coder 30B A3B Instruct

Qwen 3 Coder 30B A3B Instruct is a compact mixture-of-experts coding model from Alibaba Cloud, activating only 3 billion parameters per inference while delivering strong agentic coding performance for cost-sensitive deployments.

View API reference
Input and output price
Prices from: Input $0.07, Output $0.27, Per 1M tokens
24h uptime
Loading AI Gateway uptime
import { streamText } from 'ai'
const result = streamText({
model: 'alibaba/qwen3-coder-30b-a3b',
prompt: 'Why is the sky blue?'
})
Read docs

Copy link to headingPlayground

Try out Qwen 3 Coder 30B A3B Instruct by Alibaba Cloud. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.

alibaba logo
alibaba logo

Qwen 3 Coder 30B A3B Instruct

Copy link to headingProviders

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Context
Max Output
Latency
Throughput
Input
Output
Cache
Web Search
Capabilities
ZDR
No Training
Free Tier
Release Date
262K8K0.2 s
$0.15/M
$0.60/M
07/31/2025
160K33K0.9 s109 tps
$0.07/M
$0.27/M
07/31/2025

Copy link to headingUptime

Direct request success rate on AI Gateway and per-provider. Visit the docs for more info.

Copy link to headingThroughput

P50 throughput on live AI Gateway traffic, in tokens per second (TPS). Visit the docs for more info.

Copy link to headingLatency

P50 time to first token (TTFT) on live AI Gateway traffic, in milliseconds. View the docs for more info.

Getting started

Call Qwen 3 Coder 30B A3B Instruct through AI Gateway with the AI SDK generateText and streamText functions, or through the OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages APIs by changing the base URL. AI Gateway authenticates the request and routes it to an available provider.

Install the AI SDK (pnpm add ai dotenv), create an API key from the API Keys page, and set it as AI_GATEWAY_API_KEY in your environment. Full setup is covered in the text generation quickstart.

index.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'alibaba/qwen3-coder-30b-a3b',
prompt: 'Why is the sky blue?',
});
console.log(result.text);
}
main().catch(console.error);

Top-level parameters

The same Qwen 3 Coder 30B A3B Instruct request in each API format AI Gateway supports.

top-level-params.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'alibaba/qwen3-coder-30b-a3b',
system: 'You are a concise technical assistant.',
prompt: 'Summarize the tradeoffs between static generation and SSR.',
maxOutputTokens: 1024,
temperature: 0.5,
});
console.log(result.text);
}
main().catch(console.error);

Standard parameters like prompt, messages, temperature, and tools work as documented in the AI SDK docs. These are the parameters with model-specific behavior.

ParameterTypeRequiredDescription
modelstringYesModel ID in the form creator/model, e.g. alibaba/qwen3-coder-30b-a3b. AI Gateway routes the request to an available provider.
maxOutputTokensnumberNoHard cap on generated tokens. Qwen 3 Coder 30B A3B Instruct supports up to 32,768 output tokens.
providerOptionsRecord<string, JSONValue>NoAI Gateway routing options under gateway, plus any provider-native options under the provider’s own namespace — see the table below.

Input limits

InputFormatsSourcesMax countMax sizeLimits
TextPrompt and response share the 262K-token context window

Provider options

Set AI Gateway routing options under providerOptions.gateway. For provider-specific options, pass them under the provider’s namespace as documented by the AI SDK.

Learn more in the AI SDK alibaba provider docs.

provider-options.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'alibaba/qwen3-coder-30b-a3b',
prompt: 'Why is the sky blue?',
providerOptions: {
gateway: {
only: ['bedrock', 'novita'],
},
},
});
console.log(result.text);
}
main().catch(console.error);

These AI Gateway routing options apply to every model. Provider-specific options pass through under the provider’s own namespace (for example providerOptions.anthropic) exactly as documented by the AI SDK.

ParameterTypeRequiredDescription
providerOptions.gateway.onlystring[]NoRestrict routing to these provider slugs. Requests fail over only within the listed providers.
providerOptions.gateway.orderstring[]NoPreferred provider order. Listed providers are tried first; unlisted providers remain available as fallbacks.
providerOptions.gateway.sort'cost' | 'ttft' | 'tps'NoRank candidate providers by price, time to first token, or tokens per second instead of the default routing order.
providerOptions.gateway.zeroDataRetentionbooleanNoRoute only to providers with a zero-data-retention policy for this model.

Routing across providers

AI Gateway serves the same model through multiple providers and fails over automatically. order expresses a preference while keeping every provider eligible; only is a hard allowlist — if none of the listed providers are available the request fails instead of falling back.

Options under a provider's own namespace (for example providerOptions.anthropic) are forwarded to that provider with the request. Providers ignore option namespaces that don't apply to them, so it is safe to set provider options alongside gateway routing options.

Tool calling

Expose tools the model can call. Define each tool’s inputs with a Zod schema.

tool-calling.ts
import { generateText, tool } from 'ai';
import { z } from 'zod';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'alibaba/qwen3-coder-30b-a3b',
prompt: 'What is the weather in San Francisco?',
tools: {
getWeather: tool({
description: 'Get the current weather for a location',
inputSchema: z.object({ location: z.string() }),
execute: async ({ location }) => ({ location, temperatureC: 18 }),
}),
},
});
console.log(result.text);
}
main().catch(console.error);

Copy link to headingMore models by Alibaba Cloud

Model
Context
Latency
Throughput
Input
Output
Cache
Web Search
Capabilities
Providers
ZDR
No Training
Free Tier
Release Date
991K4.0 s50 tps
$2/M
$6/M
Read$0.25/M
Write$2.50/M
+2
alibaba logo
09/01/2026
991K1.1 s96 tps
$0.16/M
$0.47/M
Read$0.02/M
Write$0.20/M
+2
alibaba logo
08/26/2026
1M0.6 s133 tps
$0.10/M
$0.40/M
Read$0.01/M
Write$0.63/M
+1
alibaba logo
deepinfra logo
morph logo
+3
08/14/2026
1M2.5 s160 tps
$2/M
$6/M
Read$0.25/M
Write$2.50/M
+1
alibaba logo
fireworks logo
08/02/2026
991K2.5 s140 tps
$0.03/M+2 more
$0.13/M+2 more
Read$0.006/M
Write$0.04/M
+2
alibaba logo
07/28/2026
1M2.0 s58 tps
$0.40/M+1 more
$1.60/M+1 more
Read$0.08/M
Write$0.50/M
+2
alibaba logo
06/02/2026

Copy link to headingAbout Qwen 3 Coder 30B A3B Instruct

Qwen 3 Coder 30B A3B Instruct is the accessible tier of the Qwen3-Coder family. The "30B-A3B" naming convention is explicit: 30 billion total parameters in the MoE architecture, with 3 billion activated during inference. That 10:1 ratio between stored and active capacity is the model's defining characteristic: broad capacity at 30B scale combined with 3B-equivalent serving costs.

Like its larger sibling, Qwen 3 Coder 30B A3B Instruct was developed within the Qwen3-Coder framework, carrying the same coding-first orientation: deep familiarity with programming languages, patterns, and developer workflows, paired with tuning for real-world coding tasks rather than just benchmark patterns.

The 3B active parameter count translates to meaningfully faster inference than dense models of comparable quality, which matters for interactive development tools where the model is invoked frequently.

Agentic capabilities (multi-turn tool use, plan-execute-debug iteration, and environment interaction) are present in this variant given its origin in the Qwen3-Coder lineage. Teams building coding assistants, automated review pipelines, or developer-facing products can use Qwen 3 Coder 30B A3B Instruct as a cost-effective foundation without sacrificing the core agentic orientation that distinguishes the Qwen3-Coder family from general-purpose models.

Copy link to headingWhat To Consider When Choosing a Provider

  • Configuration: The 30B total / 3B active parameter structure keeps serving costs tractable, worth factoring in when you're comparing tiers within the Qwen3-Coder family.
  • Zero Data Retention: Zero Data Retention is available for this model. It is offered on a per-provider and model basis. See the documentation for details.
  • Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.

Copy link to headingWhen to Use Qwen 3 Coder 30B A3B Instruct

Best for

  • Cost-sensitive agentic coding deployments: When you need a model that understands code at a meaningful depth and can handle multi-step workflows, but the per-token cost of the 480B-A35B variant isn't justified by your use case or volume, the 30B-A3B offers a practical alternative
  • Interactive coding tools with latency requirements: The 3B active parameter count yields faster token generation than larger dense or MoE models. For coding assistants embedded in editors or IDEs where response time affects user experience, this matters
  • High-frequency automated code tasks: CI/CD pipelines, automated PR description generation, code review summarization, and similar high-volume tasks are served well by a capable but economical model

Consider alternatives when

  • The task requires the highest coding capability: For the most complex repository-level engineering problems, multi-file refactors with subtle dependencies, or tasks where getting it right the first time is critical, the larger Qwen3-Coder variant offers a higher performance ceiling
  • General knowledge and reasoning matter as much as code: This model is optimized for coding scenarios. Tasks that blend heavy general-domain reasoning with code may perform better on a general-purpose Qwen3 model of equivalent or larger size
  • Extremely long context is required: Verify the context window (262.1K tokens) against your specific use case, particularly for agentic tasks that accumulate long tool-call histories

Qwen 3 Coder 30B A3B Instruct carves out the practical middle ground in agentic coding: enough code intelligence and multi-step reasoning for real software engineering tasks, at inference costs that make high-volume deployment financially viable. Through AI Gateway, the operational complexity of managing multiple provider relationships collapses into a single endpoint with built-in reliability.

Copy link to headingFrequently Asked Questions

  • What is the relationship between Qwen 3 Coder 30B A3B Instruct and the 480B-A35B variant?

    Both belong to the Qwen3-Coder family and share the same coding-first orientation. The 30B-A3B activates 3B parameters per inference versus 35B for the 480B-A35B model. The tradeoff is lower peak capability in exchange for lower serving cost and latency.

  • What does the "A3B" suffix indicate?

    "A3B" stands for 3 billion activated parameters. In the mixture-of-experts architecture, each inference step routes through a subset of the total parameter space. The model stores 30 billion parameters but computes with only 3 billion per forward pass.

  • How is Qwen 3 Coder 30B A3B Instruct different from the general Qwen3-30B-A3B?

    Qwen 3 Coder 30B A3B Instruct is specifically from the coding-specialized line in the Qwen3-Coder family. The general Qwen3-30B-A3B targets broader task coverage. The coder variant will generally outperform the general variant on coding-specific evaluations.

  • What programming languages and frameworks does Qwen 3 Coder 30B A3B Instruct cover?

    The model covers common programming languages and developer tooling. Specific language coverage details are in the Qwen3-Coder technical documentation at https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html.

  • Can I use Qwen 3 Coder 30B A3B Instruct for multi-file codebases and agentic sessions?

    Yes. Qwen 3 Coder 30B A3B Instruct inherits the agentic coding orientation of the Qwen3-Coder family, including tool-calling support and the ability to operate in plan-execute-debug loops. The context window (262.1K tokens) determines how much code and conversation history fits in a single session.

  • How does the MoE architecture affect throughput compared to a dense model?

    With 3B active parameters, the per-token compute cost is equivalent to a 3B dense model, which is substantially faster than a dense 30B model serving the same traffic. For throughput-sensitive applications, this translates to more requests served per unit of compute.

  • Is Qwen 3 Coder 30B A3B Instruct open source?

    The Qwen3-Coder family is released as open models. Check https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html for licensing terms and model cards.

Your use is subject to Alibaba Cloud's Terms & Privacy Policies.