{"slug":"qwen3.8-flash","name":"Qwen3.8 Flash","family":"qwen","family_name":"Qwen","developer":"Alibaba","color":"#ff6a00","status":"active","released":"2026-08-26","snapshot_of":null,"open":false,"context":1000000,"max_output":131072,"knowledge_cutoff":null,"modalities":["text","image","video"],"output_modalities":["text"],"reasoning":true,"tools":true,"structured_output":true,"huggingface":"Qwen/Qwen3.8-Flash-Next","speed":51,"latency":0.87,"short":"A closed, low-priced multimodal model from Alibaba, released August 2026, with a 1M-token context window. It has no benchmark results in the registry, so its profile rests on specifications and price.","strengths":["Input costs $0.15 per million tokens, well below the $1.01 blended median","Blended price of $0.23 per million tokens ranks 30th of 194 on price","Accepts text, image and video input with a 1M-token context window","Supports tool calling, structured output and reasoning mode"],"weaknesses":["No benchmark results are recorded, so quality cannot be compared with other models","Served by three providers only: Novita, OpenRouter and Together AI","Not built into the Pydantic AI Gateway"],"best_for":"Cost-sensitive agents that need long context, multimodal input and tool calling, where benchmark evidence is not required.","long":"Qwen3.8 Flash is a closed-weights model from Alibaba, released in August 2026. Its main appeal in the registry is price. Input tokens cost $0.15 per million and output tokens $0.47, giving a blended price of $0.23 per million tokens against a registry median of about $1.01. That places it 30th of 194 on price. It is also the kind of model that gets used heavily, ranking 20th of 194 on popularity.\n\nThe specification set is broad for a low-cost model. It has a 1M-token context window and a maximum response of 131k tokens. It accepts text, image and video input, and supports tool calling, structured output and a reasoning mode. Its knowledge cutoff is not recorded.\n\nThe main gap is evidence of quality. The registry holds no benchmark results and no intelligence index score for this model, so its capability relative to others cannot be judged from the registry alone. It is available from Novita, OpenRouter and Together AI, and it is not built into the Pydantic AI Gateway.","described":true,"gateway":false,"byok":true,"string":"openrouter:qwen/qwen3.8-flash","input":0.15,"output":0.47,"cache_read":0.016,"blended":0.23,"efficiency":null,"bench":{},"offers":[{"provider":"novita","name":"Novita","model_id":"qwen/qwen3.8-flash","api":["openai"],"input":0.15,"output":0.47,"cache_read":0.016,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":1000000,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":null,"gateway_string":null},{"provider":"openrouter","name":"OpenRouter","model_id":"qwen/qwen3.8-flash","api":["openai"],"input":0.15,"output":0.47,"cache_read":0.016,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":1000000,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"openrouter:qwen/qwen3.8-flash","gateway_string":null},{"provider":"together","name":"Together AI","model_id":"Qwen/Qwen3.8-Flash","api":["openai"],"input":0.15,"output":0.47,"cache_read":null,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":1000000,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"together:Qwen/Qwen3.8-Flash","gateway_string":null}],"ranks":{"intelligence":null,"popularity":20,"efficiency":null,"speed":120,"price":30},"top_score":0.4048,"about":["A closed, low-priced multimodal model from Alibaba, released August 2026, with a 1M-token context window. It has no benchmark results in the registry, so its profile rests on specifications and price.","Qwen3.8 Flash is a closed-weights model from Alibaba, released in August 2026. Its main appeal in the registry is price. Input tokens cost $0.15 per million and output tokens $0.47, giving a blended price of $0.23 per million tokens against a registry median of about $1.01. That places it 30th of 194 on price. It is also the kind of model that gets used heavily, ranking 20th of 194 on popularity.","The specification set is broad for a low-cost model. It has a 1M-token context window and a maximum response of 131k tokens. It accepts text, image and video input, and supports tool calling, structured output and a reasoning mode. Its knowledge cutoff is not recorded.","The main gap is evidence of quality. The registry holds no benchmark results and no intelligence index score for this model, so its capability relative to others cannot be judged from the registry alone. It is available from Novita, OpenRouter and Together AI, and it is not built into the Pydantic AI Gateway."],"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.8-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.8-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.8-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.8-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.8-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.8-flash'","soon":false},{"file":"codex.sh","lang":"sh","code":"# npm install -g @openai/codex\nexport OPENROUTER_API_KEY='...'\n\ncodex --model 'qwen/qwen3.8-flash' \\\n  -c model_provider='openrouter' \\\n  -c model_providers.openrouter.name='Novita' \\\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.8-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}}