{"slug":"qwen3.8-27b","name":"Qwen3.8 27B","family":"qwen","family_name":"Qwen","developer":"Alibaba","color":"#ff6a00","status":"active","released":"2026-08-14","snapshot_of":null,"open":true,"context":262144,"max_output":131072,"knowledge_cutoff":null,"modalities":["text","image","video"],"output_modalities":["text"],"reasoning":true,"tools":true,"structured_output":true,"huggingface":"Qwen/Qwen3.8-27B","speed":43,"latency":0.86,"short":"Open-weights model from Alibaba that accepts text, image and video input. Its standout is a strong WebDev Arena rating, while its reasoning benchmarks sit near or below the median.","strengths":["WebDev Arena rating of 1593, 20th of 85 and above the median","Accepts text, image and video input, with tool calling and structured output","262k context window and 131k maximum response length","Open weights, with input priced at $0.45 per million tokens"],"weaknesses":["ARC-AGI-2 score of 42.4%, 44th of 68 and well below the median","SciCode score of 46.6%, 63rd of 96 and below the median","APEX-Agents score of 47.5%, 39th of 60 and below the median"],"best_for":"Web app and front-end generation, multimodal input, and tool-using agents where abstract reasoning is less central.","long":"This is an open-weights model from Alibaba that accepts text, image and video and supports tool calling, structured output and a reasoning mode. Its 262k context window and 131k maximum response length are large. Input costs $0.45 per million tokens and output $3 per million, giving a blended price of $1.09, slightly above the registry median of $1.01.\n\nOn benchmarks the picture is mixed. Its WebDev Arena rating of 1593 ranks 20th of 85 and is clearly above the median, which is its strongest result. The composite intelligence index of 59.2 sits just below the median, and ARC-AGI-2, SciCode and APEX-Agents all fall below it. Results for other agent-relevant tasks are not reported.\n\nIt is served by six providers and is built into the Pydantic AI Gateway. It suits work where web app generation and multimodal input matter more than abstract reasoning.","described":true,"gateway":true,"byok":true,"string":"gateway/doubleword:Qwen/Qwen3.8-27B-FP8","input":0.45,"output":3,"cache_read":0.04,"blended":1.0875,"efficiency":54.4,"bench":{"index":59.2,"arc_agi_2":42.4,"scicode":46.6,"webdev":1593.3,"apex":47.5,"lmarena":1437.7},"offers":[{"provider":"doubleword","name":"Doubleword","model_id":"Qwen/Qwen3.8-27B-FP8","api":["openai"],"input":0.45,"output":3,"cache_read":0.04,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":262144,"deprecated":false,"gateway":true,"gateway_route":"doubleword","byok":true,"string":null,"gateway_string":"gateway/doubleword:Qwen/Qwen3.8-27B-FP8"},{"provider":"groq","name":"Groq","model_id":"qwen/qwen3.8-27b","api":["openai"],"input":0.8,"output":4,"cache_read":null,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":131072,"deprecated":false,"gateway":true,"gateway_route":"groq","byok":true,"string":"groq:qwen/qwen3.8-27b","gateway_string":"gateway/groq:qwen/qwen3.8-27b"},{"provider":"openrouter","name":"OpenRouter","model_id":"qwen/qwen3.8-27b","api":["openai"],"input":0.425,"output":2.55,"cache_read":0.085,"cache_write":0.53125,"input_tiers":[],"output_tiers":[],"context":1000000,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"openrouter:qwen/qwen3.8-27b","gateway_string":null},{"provider":"novita","name":"Novita","model_id":"qwen/qwen3.8-27b","api":["openai"],"input":0.42,"output":3,"cache_read":0.085,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":1000000,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":null,"gateway_string":null},{"provider":"cloudflare","name":"Cloudflare Workers AI","model_id":"@cf/qwen/qwen3.8-27b","api":["openai"],"input":0.45,"output":3.2,"cache_read":null,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":262144,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":null,"gateway_string":null},{"provider":"ovhcloud","name":"OVHcloud","model_id":"Qwen3.8-27B","api":["openai"],"input":0.47,"output":3.19,"cache_read":null,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":262144,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"ovhcloud:Qwen3.8-27B","gateway_string":null}],"ranks":{"intelligence":57,"popularity":25,"efficiency":41,"speed":138,"price":100},"top_score":0.7968,"about":["Open-weights model from Alibaba that accepts text, image and video input. Its standout is a strong WebDev Arena rating, while its reasoning benchmarks sit near or below the median.","This is an open-weights model from Alibaba that accepts text, image and video and supports tool calling, structured output and a reasoning mode. Its 262k context window and 131k maximum response length are large. Input costs $0.45 per million tokens and output $3 per million, giving a blended price of $1.09, slightly above the registry median of $1.01.","On benchmarks the picture is mixed. Its WebDev Arena rating of 1593 ranks 20th of 85 and is clearly above the median, which is its strongest result. The composite intelligence index of 59.2 sits just below the median, and ARC-AGI-2, SciCode and APEX-Agents all fall below it. Results for other agent-relevant tasks are not reported.","It is served by six providers and is built into the Pydantic AI Gateway. It suits work where web app generation and multimodal input matter more than abstract reasoning."],"examples":[{"file":"hello.py","lang":"python","code":"# /// script\n# dependencies = [\"pydantic-ai\"]\n# ///\nimport os\n\nfrom pydantic_ai import Agent\n\nos.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'\n\nagent = Agent('gateway/doubleword:Qwen/Qwen3.8-27B-FP8', 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['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'\n\n\nclass CityLocation(BaseModel):\n    city: str\n    country: str\n\n\nagent = Agent('gateway/doubleword:Qwen/Qwen3.8-27B-FP8', 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['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'\n\nagent = Agent(\n    'gateway/doubleword:Qwen/Qwen3.8-27B-FP8',\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['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'\n\nagent = Agent('gateway/doubleword:Qwen/Qwen3.8-27B-FP8')\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 PYDANTIC_AI_GATEWAY_API_KEY='...'\n\nuvx pax --model 'gateway/doubleword:Qwen/Qwen3.8-27B-FP8'","soon":true},{"file":"codex.sh","lang":"sh","code":"# npm install -g @openai/codex\nexport PYDANTIC_AI_GATEWAY_API_KEY='...'\n\ncodex --model 'Qwen/Qwen3.8-27B-FP8' \\\n  -c model_provider='gateway' \\\n  -c model_providers.gateway.name='Pydantic AI Gateway' \\\n  -c model_providers.gateway.base_url='https://gateway.pydantic.dev/proxy/doubleword/v1' \\\n  -c model_providers.gateway.env_key='PYDANTIC_AI_GATEWAY_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.PYDANTIC_AI_GATEWAY_API_KEY = '...'\n\nconst doubleword = createOpenAICompatible({\n  baseURL: 'https://gateway.pydantic.dev/proxy/doubleword',\n  apiKey: process.env.PYDANTIC_AI_GATEWAY_API_KEY,\n})\n\nconst { text } = await generateText({\n  model: doubleword('Qwen/Qwen3.8-27B-FP8'),\n  system: 'Be concise, reply with one sentence.',\n  prompt: 'Where does \"hello world\" come from?',\n})\nconsole.log(text)","soon":false}],"benchmarks":[{"id":"index","name":"Intelligence index","unit":"","desc":"Our composite of the benchmarks below, 0-100","category":"reference","floor":0,"ceiling":100,"url":"/methodology/","credit":"Pydantic, from the sources credited below"},{"id":"arc_agi_2","name":"ARC-AGI-2","unit":"%","desc":"Abstract visual puzzles that test learning a new rule from a few examples","category":"reasoning","floor":0,"ceiling":100,"url":"https://arcprize.org/leaderboard","credit":"ARC Prize, via Epoch AI (CC BY 4.0)"},{"id":"scicode","name":"SciCode","unit":"%","desc":"Scientific programming problems written by researchers","category":"coding","floor":0,"ceiling":100,"url":"https://scicode-bench.github.io/","credit":"SciCode, via Epoch AI (CC BY 4.0)"},{"id":"webdev","name":"WebDev Arena","unit":"","desc":"Rating from human votes on web apps the models built","category":"coding","floor":1000,"ceiling":1900,"url":"https://web.lmarena.ai/leaderboard","credit":"LMArena, via Epoch AI (CC BY 4.0)"},{"id":"apex","name":"APEX-Agents","unit":"%","desc":"Long professional tasks (banking, consulting, law) passed on the first attempt","category":"agents","floor":0,"ceiling":100,"url":"https://epoch.ai/benchmarks","credit":"Mercor, via Epoch AI (CC BY 4.0)"},{"id":"lmarena","name":"LMArena text","unit":"","desc":"Rating from blind human votes between pairs of chat responses","category":"preference","floor":1100,"ceiling":1600,"url":"https://lmarena.ai/leaderboard/text","credit":"LMArena (CC BY 4.0)"}],"generated":"2026-11-25","gaps":{"speed":3,"index":80,"description":0}}