{"slug":"qwen3.8-max-prime","name":"Qwen3.8 Max Prime","family":"qwen","family_name":"Qwen","developer":"Alibaba","color":"#ff6a00","status":"active","released":"2026-09-23","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":null,"speed":51,"latency":2.57,"short":"A closed, large-context model from Alibaba that accepts text, image and video input. It has no benchmark results in the registry and is priced well above the median, with one provider.","strengths":["1M token context window","Accepts text, image and video input","Supports tool calling, reasoning mode and structured output","Released September 2026"],"weaknesses":["Blended price $6 per million tokens, far above the registry median of about $1","Output costs $12 per million tokens, 31st most expensive of 194","No benchmark results, so capability cannot be compared with other models"],"best_for":"Agents that need a very large context window or multimodal input and can accept a high per-token price.","long":"Qwen3.8 Max Prime is a closed-weight model from Alibaba, released in September 2026. It offers a 1M token context window and a response limit of 131k tokens, and it accepts text, image and video input. Tool calling, reasoning mode and structured output are all supported.\n\nThe main cost to weigh is price. At $4 per million input tokens and $12 per million output tokens, its blended rate of $6 is several times the registry median. It is served by one provider, OpenRouter, which is also a limit on availability.\n\nThe registry holds no benchmark results for this model, so its reasoning or coding quality cannot be ranked against others. Its knowledge cutoff is not listed. Choosing it rests on its context size, multimodal input and feature support rather than on measured performance.","described":true,"gateway":false,"byok":true,"string":"openrouter:qwen/qwen3.8-max-prime","input":4,"output":12,"cache_read":0.5,"blended":6,"efficiency":null,"bench":{},"offers":[{"provider":"openrouter","name":"OpenRouter","model_id":"qwen/qwen3.8-max-prime","api":["openai"],"input":4,"output":12,"cache_read":0.5,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":1000000,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"openrouter:qwen/qwen3.8-max-prime","gateway_string":null}],"ranks":{"intelligence":null,"popularity":140,"efficiency":null,"speed":120,"price":163},"top_score":0.119,"about":["A closed, large-context model from Alibaba that accepts text, image and video input. It has no benchmark results in the registry and is priced well above the median, with one provider.","Qwen3.8 Max Prime is a closed-weight model from Alibaba, released in September 2026. It offers a 1M token context window and a response limit of 131k tokens, and it accepts text, image and video input. Tool calling, reasoning mode and structured output are all supported.","The main cost to weigh is price. At $4 per million input tokens and $12 per million output tokens, its blended rate of $6 is several times the registry median. It is served by one provider, OpenRouter, which is also a limit on availability.","The registry holds no benchmark results for this model, so its reasoning or coding quality cannot be ranked against others. Its knowledge cutoff is not listed. Choosing it rests on its context size, multimodal input and feature support rather than on measured performance."],"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-max-prime', 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-max-prime', 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-max-prime',\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-max-prime')\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-max-prime'","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-max-prime'","soon":false},{"file":"codex.sh","lang":"sh","code":"# npm install -g @openai/codex\nexport OPENROUTER_API_KEY='...'\n\ncodex --model 'qwen/qwen3.8-max-prime' \\\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.8-max-prime'),\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}}