{"slug":"gpt-oss-120b","name":"gpt-oss-120b","family":"openai","family_name":"OpenAI","developer":"OpenAI","color":"#10a37f","status":"active","released":"2025-08-05","snapshot_of":null,"open":true,"context":131072,"max_output":117964,"knowledge_cutoff":"2024-06","modalities":["text"],"output_modalities":["text"],"reasoning":true,"tools":true,"structured_output":true,"huggingface":"openai/gpt-oss-120b","speed":121.5,"latency":0.45,"short":"An open-weights 120B-parameter-class model from OpenAI, released August 2025, priced very low for its size. Its benchmark scores mostly sit well below the registry median.","strengths":["Input costs $0.15 per million tokens, well below the $1.01 registry median blend","Blended price of $0.26 per million tokens, 38th of 194 for price","Efficiency rank 19 of 194 on intelligence points per dollar","Supports tool calling, reasoning mode and structured output"],"weaknesses":["Intelligence index 34.3, 112th of 114 against a median of 59.5","APEX-Agents 4.4%, last of 60 against a median of 54.3%","Terminal-Bench 18.7%, 32nd of 35 against a median of 43.2%"],"best_for":"Cost-sensitive, high-volume tasks with simple reasoning, structured output or tool calls, where a weaker model is acceptable.","long":"gpt-oss-120b is an open-weights text model from OpenAI, released in August 2025, with a 131k token context window and reasoning mode. Its main appeal is price. At $0.15 per million input tokens and $0.60 per million output tokens, it is among the cheaper options in the registry, and its intelligence points per dollar rank 19th of 194. It is available from nine providers, and it is built into the Pydantic AI Gateway.\n\nThe capability results are weak relative to the registry. Its intelligence index of 34.3 ranks 112th of 114, and it scores below the median on every benchmark listed. GPQA Diamond is 75.8% against a median of 89.8%, and it places 85th of 94. On agentic tests it is weakest: APEX-Agents is 4.4%, last of 60, and Terminal-Bench is 18.7%, 32nd of 35. LMArena places it 106th of 114.\n\nIt suits tasks where cost matters more than peak quality and the work is fairly routine. Anything requiring careful multi-step agent behaviour should be tested before use.","described":true,"gateway":true,"byok":true,"string":"gateway/groq:openai/gpt-oss-120b","input":0.15,"output":0.6,"cache_read":0.075,"blended":0.2625,"efficiency":130.7,"bench":{"index":34.3,"gpqa":75.8,"aime":88.9,"terminal":18.7,"scicode":36,"apex":4.4,"lmarena":1365.4,"eci":140.2},"offers":[{"provider":"groq","name":"Groq","model_id":"openai/gpt-oss-120b","api":["openai"],"input":0.15,"output":0.6,"cache_read":0.075,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":131072,"deprecated":false,"gateway":true,"gateway_route":"groq","byok":true,"string":"groq:openai/gpt-oss-120b","gateway_string":"gateway/groq:openai/gpt-oss-120b"},{"provider":"novita","name":"Novita","model_id":"openai/gpt-oss-120b","api":["openai"],"input":0.05,"output":0.25,"cache_read":null,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":131072,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":null,"gateway_string":null},{"provider":"ovhcloud","name":"OVHcloud","model_id":"gpt-oss-120b","api":["openai"],"input":0.09,"output":0.47,"cache_read":null,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":131072,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"ovhcloud:gpt-oss-120b","gateway_string":null},{"provider":"baseten","name":"Baseten","model_id":"openai/gpt-oss-120b","api":["openai"],"input":0.1,"output":0.5,"cache_read":null,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":128000,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":null,"gateway_string":null},{"provider":"openrouter","name":"OpenRouter","model_id":"openai/gpt-oss-120b","api":["openai"],"input":0.1,"output":0.5,"cache_read":null,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":null,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"openrouter:openai/gpt-oss-120b","gateway_string":null},{"provider":"fireworks","name":"Fireworks","model_id":"gpt-oss-120b","api":["openai"],"input":0.15,"output":0.6,"cache_read":0.015,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":131072,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"fireworks:gpt-oss-120b","gateway_string":null},{"provider":"together","name":"Together AI","model_id":"openai/gpt-oss-120b","api":["openai"],"input":0.15,"output":0.6,"cache_read":null,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":131072,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"together:openai/gpt-oss-120b","gateway_string":null},{"provider":"cerebras","name":"Cerebras","model_id":"gpt-oss-120b","api":["openai"],"input":0.35,"output":0.75,"cache_read":null,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":131072,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":"cerebras:gpt-oss-120b","gateway_string":null},{"provider":"cloudflare","name":"Cloudflare Workers AI","model_id":"@cf/openai/gpt-oss-120b","api":["openai"],"input":0.35,"output":0.75,"cache_read":null,"cache_write":null,"input_tiers":[],"output_tiers":[],"context":128000,"deprecated":false,"gateway":false,"gateway_route":null,"byok":true,"string":null,"gateway_string":null}],"ranks":{"intelligence":109,"popularity":40,"efficiency":19,"speed":27,"price":38},"top_score":0.6881,"about":["An open-weights 120B-parameter-class model from OpenAI, released August 2025, priced very low for its size. Its benchmark scores mostly sit well below the registry median.","gpt-oss-120b is an open-weights text model from OpenAI, released in August 2025, with a 131k token context window and reasoning mode. Its main appeal is price. At $0.15 per million input tokens and $0.60 per million output tokens, it is among the cheaper options in the registry, and its intelligence points per dollar rank 19th of 194. It is available from nine providers, and it is built into the Pydantic AI Gateway.","The capability results are weak relative to the registry. Its intelligence index of 34.3 ranks 112th of 114, and it scores below the median on every benchmark listed. GPQA Diamond is 75.8% against a median of 89.8%, and it places 85th of 94. On agentic tests it is weakest: APEX-Agents is 4.4%, last of 60, and Terminal-Bench is 18.7%, 32nd of 35. LMArena places it 106th of 114.","It suits tasks where cost matters more than peak quality and the work is fairly routine. Anything requiring careful multi-step agent behaviour should be tested before use."],"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/groq:openai/gpt-oss-120b', 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/groq:openai/gpt-oss-120b', 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/groq:openai/gpt-oss-120b',\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/groq:openai/gpt-oss-120b')\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/groq:openai/gpt-oss-120b'","soon":true},{"file":"pi.sh","lang":"sh","code":"# npm install -g @earendil-works/pi-coding-agent\nexport PYDANTIC_AI_GATEWAY_API_KEY='...'\n\n# pi has no built-in Gateway provider, so register one.\n# Merge this by hand if you already have a models.json.\nmkdir -p ~/.pi/agent\ncat > ~/.pi/agent/models.json <<'EOF'\n{\n  \"providers\": {\n    \"pydantic-ai-gateway\": {\n      \"baseUrl\": \"https://gateway.pydantic.dev/proxy/groq/v1\",\n      \"api\": \"openai-completions\",\n      \"apiKey\": \"$PYDANTIC_AI_GATEWAY_API_KEY\",\n      \"models\": [\n        {\n          \"id\": \"openai/gpt-oss-120b\"\n        }\n      ]\n    }\n  }\n}\nEOF\n\npi --provider pydantic-ai-gateway --model 'openai/gpt-oss-120b'","soon":false},{"file":"codex.sh","lang":"sh","code":"# npm install -g @openai/codex\nexport PYDANTIC_AI_GATEWAY_API_KEY='...'\n\ncodex --model 'openai/gpt-oss-120b' \\\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/groq/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/groq\nimport { createGroq } from '@ai-sdk/groq'\nimport { generateText } from 'ai'\n\nprocess.env.PYDANTIC_AI_GATEWAY_API_KEY = '...'\n\nconst groq = createGroq({\n  baseURL: 'https://gateway.pydantic.dev/proxy/groq',\n  apiKey: process.env.PYDANTIC_AI_GATEWAY_API_KEY,\n})\n\nconst { text } = await generateText({\n  model: groq('openai/gpt-oss-120b'),\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":"gpqa","name":"GPQA Diamond","unit":"%","desc":"Graduate-level science questions, multiple choice","category":"reasoning","floor":25,"ceiling":97,"url":"https://epoch.ai/benchmarks/gpqa-diamond","credit":"Epoch AI (CC BY 4.0)"},{"id":"aime","name":"OTIS Mock AIME","unit":"%","desc":"Competition mathematics problems with exact answers","category":"reasoning","floor":0,"ceiling":100,"url":"https://epoch.ai/benchmarks/otis-mock-aime-2024-2025","credit":"Epoch AI (CC BY 4.0)"},{"id":"terminal","name":"Terminal-Bench","unit":"%","desc":"Tasks completed in a terminal; the best result of any agent using the model","category":"coding","floor":0,"ceiling":100,"url":"https://www.tbench.ai/leaderboard/terminal-bench/2.0","credit":"Terminal-Bench, 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":"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)"},{"id":"eci","name":"Epoch Capabilities Index","unit":"","desc":"Epoch AI's own composite across about 40 benchmarks; shown for comparison, not part of our index","category":"reference","floor":80,"ceiling":180,"url":"https://epoch.ai/benchmarks/eci","credit":"Epoch AI (CC BY 4.0)"}],"generated":"2026-11-25","gaps":{"speed":3,"index":80,"description":0}}