Appearance
OpenAI GPT-OSS 120b ​
End of Life
GPT-OSS 120b reached end of life on 12 October 2026 and is no longer available. See the models overview for currently available models.
The documentation below is retained for historical reference.
GPT-OSS 120b was an open-weight reasoning model designed for developers, researchers, and enterprises who needed the advanced reasoning capabilities of chain-of-thought processing to tackle their hardest problems.
The model was trained to think step-by-step before responding with an answer, excelling at complex reasoning tasks such as coding, mathematics, planning, puzzles, and agent workflows.
It featured adjustable reasoning effort levels, allowing you to balance performance with computational cost.
Benchmarks ​
Below are the findings from independent benchmark provider Artificial Analysis:

Intelligence: GPT-OSS 120b scored extremely well for its size and sparsity, beating o3-mini but coming in behind o4-mini and o3. The model ranked the most intelligent for its size.
Comparison to other open weights models: While GPT-OSS 120b did not come in above Qwen3 235B 2507's score of 64, it outperformed DeepSeek R1 0528's score of 59. It is notable that it was significantly smaller in both total and active parameters than both of those models. DeepSeek R1 has 671B total parameters and 37B active parameters, and is released natively in FP8 precision, making its total file size (and memory requirements) over 10x larger than GPT-OSS 120b. GPT-OSS 120b was a text-only model (similar to competing models from DeepSeek, Alibaba and others).
How to use GPT-OSS 120b ​
Since reasoning models produce longer responses with chain-of-thought processing, we recommended streaming tokens for better user experience:
python
import os
from openai import OpenAI
client = openai.OpenAI(
api_key=os.getenv("YOUR_API_KEY"),
base_url="https://api.swisscom.com/layer/swiss-ai-platform/gpt-oss-120b/v1",
)
stream = client.chat.completions.create(
model="openai/gpt-oss-120b",
messages=[
{"role": "user", "content": "What are the first 10 prime numbers?"}
],
temperature=1.0,
reasoning_effort='medium',
stream=True
)
for chunk in stream:
print(chunk)
print(chunk.choices[0].delta.content)
print("****************")ts
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env["YOUR_API_KEY"],
baseURL: "https://api.swisscom.com/layer/swiss-ai-platform/gpt-oss-120b/v1"
});
const stream = await client.chat.completions.create({
model: "openai/gpt-oss-120b",
messages: [{
role: "user",
content: "What are the first 10 prime numbers?"
}],
temperature: 1.0,
reasoning_effort: "medium",
stream: true,
});
for await (const chunk of stream) {
console.log(event)
}bash
curl -X POST "https://api.swisscom.com/layer/swiss-ai-platform/gpt-oss-120b/v1/chat/completions" \
-H "Authorization: Bearer $YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-oss-120b",
"messages": [
{
"role": "user",
"content": "What are the first 10 prime numbers?"
}
],
"temperature": 1.0,
"reasoning_effort": "medium",
"stream": true
}'This produced the response below:
json
{
"id": "chat-abcdefg1234567",
"object": "chat.completion.chunk",
"created": 1743765837,
"model": "openai/gpt-oss-120b",
"choices": [
{
"index": 0,
"delta": {
"role": "assistant",
"content": "Okay"
},
"finish_reason": null
}
]
}json
{
"id": "chatcmpl-4e8e5b799bc44c54a434207360e6162a",
"object": "chat.completion",
"created": 1755594620,
"model": "openai/gpt-oss-120b",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The first 10 prime numbers are:\n\n1. 2 \n2. 3 \n3. 5 \n4. 7 \n5. 11 \n6. 13 \n7. 17 \n8. 19 \n9. 23 \n10. 29",
"refusal": null,
"annotations": null,
"audio": null,
"function_call": null,
"tool_calls": [],
"reasoning_content": "User asks: \"What are the first 10 prime numbers?\" This is straightforward. Provide answer list: 2,3,5,7,11,13,17,19,23,29. Possibly explanation. No policy issues."
},
"logprobs": null,
"finish_reason": "stop",
"stop_reason": null
}
],
"service_tier": null,
"system_fingerprint": null,
"usage": {
"prompt_tokens": 80,
"total_tokens": 197,
"completion_tokens": 117,
"prompt_tokens_details": null
},
"prompt_logprobs": null,
"kv_transfer_params": null
}To access just the chain-of-thought reasoning you could look at the reasoning_content property:
plain
User asks: "What are the first 10 prime numbers?" It's a straightforward factual question. Provide the list: 2,3,5,7,11,13,17,19,23,29.
We comply.GPT-OSS Best Practices ​
Reasoning models like GPT-OSS should be used differently than standard instruct models to get optimal results:
Recommended Parameters:
- Reasoning Effort: Use the adjustable reasoning effort levels to control computational cost vs. accuracy.
- Temperature: Use 1.0 for maximum creativity and diverse reasoning approaches.
- Top-p: Use 1.0 to allow the full vocabulary distribution for optimal reasoning exploration.
Prompting Best Practices:
Think of GPT-OSS as a senior problem-solver – provide high-level objectives and let it determine the methodology:
- Strengths: Excels at open-ended reasoning, multi-step logic, and inferring unstated requirements
- Avoid over-prompting: Micromanaging steps can limit its advanced reasoning capabilities
- Provide clear objectives: Balance clarity with flexibility for optimal results
GPT-OSS Use Cases ​
- Code Review & Analysis: Comprehensive code analysis across large codebases with detailed improvement suggestions
- Strategic Planning: Multi-stage planning with reasoning about optimal approaches and resource allocation
- Complex Document Analysis: Processing legal contracts, technical specifications, and regulatory documents
- Benchmarking AI Systems: Evaluates other LLM responses with contextual understanding, particularly useful in critical validation scenarios
- AI Model Evaluation: Sophisticated evaluation of other AI systems with contextual understanding
- Scientific Research: Multi-step reasoning for hypothesis generation and experimental design
- Academic Analysis: Deep analysis of research papers and literature reviews
- Information Extraction: Efficiently extracts relevant data from large volumes of unstructured information, ideal for RAG systems
- Agent Workflows: Building sophisticated AI agents with complex reasoning capabilities
- RAG Systems: Enhanced information extraction and synthesis from large knowledge bases
- Problem Solving: Handling ambiguous requirements and inferring unstated assumptions
- Ambiguity Resolution: Interprets unclear instructions effectively and seeks clarification when needed
Managing Context and Costs ​
Reasoning Effort Control: ​
GPT-OSS featured adjustable reasoning effort levels to optimize for your specific use case:
- Low effort: Faster responses for simpler tasks with reduced reasoning depth
- Medium effort: Balanced performance for most use cases (recommended default)
- High effort: Maximum reasoning for complex problems requiring deep analysis. You should also specify
max_tokensof 16000 with this setting.
Token Management: ​
When working with reasoning models, it's crucial to maintain adequate space in the context window:
- Use
max_tokensparameter to control response length and costs - Monitor reasoning token usage vs. output tokens - reasoning tokens can vary from hundreds to tens of thousands based on complexity
- Consider reasoning effort level based on task complexity and budget constraints
- Simpler problems may only require a few hundred reasoning tokens, while complex challenges could generate extensive reasoning
Cost/Latency Optimization: ​
- Implement limits on total token generation using the
max_tokensparameter - Balance thorough reasoning with resource utilization based on your specific requirements
- Consider using lower reasoning effort for routine tasks and higher effort for critical decisions
Technical Architecture ​
Model Architecture: ​
- MoE Design: Token-choice Mixture-of-Experts with SwiGLU activations for improved performance
- Expert Selection: Softmax-after-topk approach for calculating MoE weights, ensuring optimal expert utilization
- Attention Mechanism: RoPE (Rotary Position Embedding) with 128k context length
- Attention Patterns: Alternating between full context and sliding 128-token window for efficiency
- Attention Sink: Learned attention sink per-head with additional additive value in the softmax denominator
Tokenization: ​
- Standard Compatibility: Uses the same tokenizer as GPT-4o
- Broad Support: Ensures seamless integration with existing applications and tools
Context Handling: ​
- 128k Context Window: Large context capacity for processing extensive documents
- Efficient Patterns: Optimized attention patterns for long-context scenarios
