{"slug":"qwen3-coder-flash","name":"Qwen3 Coder Flash","family":"qwen","family_name":"Qwen","developer":"Alibaba","color":"#ff6a00","status":"active","released":"2025-07-28","snapshot_of":null,"open":false,"context":1000000,"max_output":65536,"knowledge_cutoff":"2025-04","modalities":["text"],"output_modalities":["text"],"reasoning":false,"tools":true,"structured_output":true,"huggingface":null,"speed":85,"latency":0.9,"short":"A closed-weights, low-cost coding model from Alibaba with a 1M-token context window, released July 2025. It has no benchmark results in the registry, so its profile rests on specifications and price.","strengths":["1M-token context window","Input at $0.195 per million tokens, cheap for its tier","Supports tool calling and structured output","Blended price of $0.39 per million tokens, below the $1.01 median"],"weaknesses":["No benchmark results recorded, so capability is unverified","Only one provider listed, OpenRouter","Text input only, with no reasoning mode"],"best_for":"High-volume coding and tool-using agents where low token cost and long context matter more than measured benchmark scores.","long":"Qwen3 Coder Flash is a closed-weights model from Alibaba, released in July 2025, with a knowledge cutoff of April 2025. It accepts text only and offers a 1M-token context window with responses up to 65,536 tokens. Tool calling and structured output are supported, while reasoning mode is not.\n\nThe main reason to consider it is price. Input costs $0.195 per million tokens and output $0.975 per million, giving a blended rate of $0.39 per million, well under the registry median of about $1.01. It ranks 50th of 194 on price, so it sits in the cheaper half of the registry rather than at the very bottom.\n\nThe registry holds no benchmark results for this model, so its intelligence cannot be compared with other models. It is available only through OpenRouter and is not built into the Pydantic AI Gateway. Its popularity rank is 161 of 194.","described":true,"gateway":false,"byok":true,"string":"openrouter:qwen/qwen3-coder-flash","input":0.195,"output":0.975,"cache_read":0.039,"blended":0.39,"efficiency":null,"bench":{},"offers":[{"provider":"openrouter","name":"OpenRouter","model_id":"qwen/qwen3-coder-flash","api":["openai"],"input":0.195,"output":0.975,"cache_read":0.039,"cache_write":0.24375,"input_tiers":[{"start":32000,"price":0.325},{"start":128000,"price":0.52}],"output_tiers":[{"start":32000,"price":1.625},{"start":128000,"price":2.6}],"context":1000000,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"openrouter:qwen/qwen3-coder-flash","gateway_string":null}],"ranks":{"intelligence":null,"popularity":161,"efficiency":null,"speed":61,"price":50},"top_score":0.069,"about":["A closed-weights, low-cost coding model from Alibaba with a 1M-token context window, released July 2025. It has no benchmark results in the registry, so its profile rests on specifications and price.","Qwen3 Coder Flash is a closed-weights model from Alibaba, released in July 2025, with a knowledge cutoff of April 2025. It accepts text only and offers a 1M-token context window with responses up to 65,536 tokens. Tool calling and structured output are supported, while reasoning mode is not.","The main reason to consider it is price. Input costs $0.195 per million tokens and output $0.975 per million, giving a blended rate of $0.39 per million, well under the registry median of about $1.01. It ranks 50th of 194 on price, so it sits in the cheaper half of the registry rather than at the very bottom.","The registry holds no benchmark results for this model, so its intelligence cannot be compared with other models. It is available only through OpenRouter and is not built into the Pydantic AI Gateway. Its popularity rank is 161 of 194."],"examples":[{"file":"hello.py","lang":"python","code":"# /// script\n# dependencies = [\"pydantic-ai\"]\n# ///\nimport os\n\nfrom pydantic_ai import Agent\n\nos.environ['OPENROUTER_API_KEY'] = '...'\n\nagent = Agent('openrouter:qwen/qwen3-coder-flash', instructions='Be concise, reply with one sentence.')\n\nresult = agent.run_sync('Where does \"hello world\" come from?')\nprint(result.output)","soon":false},{"file":"structured_output.py","lang":"python","code":"# /// script\n# dependencies = [\"pydantic-ai\"]\n# ///\nimport os\n\nfrom pydantic import BaseModel\nfrom pydantic_ai import Agent\n\nos.environ['OPENROUTER_API_KEY'] = '...'\n\n\nclass CityLocation(BaseModel):\n    city: str\n    country: str\n\n\nagent = Agent('openrouter:qwen/qwen3-coder-flash', output_type=CityLocation)\n\nresult = agent.run_sync('Where were the olympics held in 2012?')\nprint(result.output)\n#> city='London' country='United Kingdom'","soon":false},{"file":"tools.py","lang":"python","code":"# /// script\n# dependencies = [\"pydantic-ai\"]\n# ///\nimport os\nimport random\n\nfrom pydantic_ai import Agent, RunContext\n\nos.environ['OPENROUTER_API_KEY'] = '...'\n\nagent = Agent(\n    'openrouter:qwen/qwen3-coder-flash',\n    deps_type=str,\n    instructions=\"You're a dice game, roll the die and see if it matches the user's guess.\",\n)\n\n\n@agent.tool_plain\ndef roll_dice() -> str:\n    \"\"\"Roll a six-sided die and return the result.\"\"\"\n    return str(random.randint(1, 6))\n\n\n@agent.tool\ndef get_player_name(ctx: RunContext[str]) -> str:\n    \"\"\"Get the player's name.\"\"\"\n    return ctx.deps\n\n\nresult = agent.run_sync('My guess is 4', deps='Anne')\nprint(result.output)","soon":false},{"file":"streaming.py","lang":"python","code":"# /// script\n# dependencies = [\"pydantic-ai\"]\n# ///\nimport asyncio\nimport os\n\nfrom pydantic_ai import Agent\n\nos.environ['OPENROUTER_API_KEY'] = '...'\n\nagent = Agent('openrouter:qwen/qwen3-coder-flash')\n\n\nasync def main():\n    async with agent.run_stream('Explain prompt caching in three bullet points.') as response:\n        async for text in response.stream_text(delta=True):\n            print(text, end='', flush=True)\n\n\nasyncio.run(main())","soon":false},{"file":"pax.sh","lang":"sh","code":"export OPENROUTER_API_KEY='...'\n\nuvx pax --model 'openrouter:qwen/qwen3-coder-flash'","soon":true},{"file":"pi.sh","lang":"sh","code":"# npm install -g @earendil-works/pi-coding-agent\nexport OPENROUTER_API_KEY='...'\n\npi --model 'openrouter/qwen/qwen3-coder-flash'","soon":false},{"file":"codex.sh","lang":"sh","code":"# npm install -g @openai/codex\nexport OPENROUTER_API_KEY='...'\n\ncodex --model 'qwen/qwen3-coder-flash' \\\n  -c model_provider='openrouter' \\\n  -c model_providers.openrouter.name='OpenRouter' \\\n  -c model_providers.openrouter.base_url='https://api.openrouter.example/v1' \\\n  -c model_providers.openrouter.env_key='OPENROUTER_API_KEY'","soon":false},{"file":"ai_sdk.ts","lang":"ts","code":"// npm install ai @ai-sdk/openai-compatible\nimport { createOpenAICompatible } from '@ai-sdk/openai-compatible'\nimport { generateText } from 'ai'\n\nprocess.env.OPENROUTER_API_KEY = '...'\n\nconst openrouter = createOpenAICompatible({\n  name: 'openrouter',\n  baseURL: 'https://api.openrouter.example/v1',\n  apiKey: process.env.OPENROUTER_API_KEY,\n})\n\nconst { text } = await generateText({\n  model: openrouter('qwen/qwen3-coder-flash'),\n  system: 'Be concise, reply with one sentence.',\n  prompt: 'Where does \"hello world\" come from?',\n})\nconsole.log(text)","soon":false}],"benchmarks":[],"generated":"2026-11-25","gaps":{"speed":3,"index":80,"description":0}}