Guides · Reasoning models
Reasoning models: open thinking models, processed in the EU
Reasoning models work through a problem step by step before they give an answer. They are slower and use more tokens than standard chat models, but they are much better at maths, multi-step planning, difficult code and questions where the first idea is often wrong. On the inference.eu API you control how much they think and see how many tokens the thinking used.
- 01API format: OpenAI and Anthropic
- 02EU data centres
- 03Covered by one DPA
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.inference.eu/v1", api_key=os.environ["INFERENCE_EU_API_KEY"])
response = client.responses.create(
model="gpt-oss-120b",
reasoning={"effort": "high"},
max_output_tokens=8000,
input=(
"A warehouse ships 1,240 parcels a day. 3.5% are returned, and each return costs "
"EUR 7.80 to process. A new packaging change cuts returns by a fifth but adds "
"EUR 0.12 per parcel. Is the change worth it over a 250-day working year?"
),
)
print(response.output_text)
print("reasoning tokens:", response.usage.output_tokens_details.reasoning_tokens)How reasoning models work
When you send a request to a reasoning model such as gpt-oss-120b, the model first generates reasoning tokens, a private chain of thought in which it tries approaches, checks its work and corrects mistakes. Only then does it write the final answer. Both kinds of token are generated on our infrastructure in the EU, and both count as output tokens.
You use the same endpoints as for any other model: chat completions, Responses or Messages. The difference is in how you set limits and read the response. Reasoning helps most on problems with a verifiable answer; for simple rewriting or classification, a standard model is faster and cheaper.
Controlling reasoning effort
In the Responses API, set reasoning.effort to low, medium or high. In chat completions, the equivalent field is reasoning_effort. Low effort gives quick answers with a short chain of thought; high effort lets the model think for longer on hard problems. Start with medium and change it per task based on measured quality.
Set max_output_tokens (or max_tokens in chat completions) generously, because the limit covers reasoning plus answer. A hard problem at high effort can use thousands of reasoning tokens before the first word of the answer. If the limit is too low, the response ends before the answer appears.
Reading the response
In the Responses API, output contains a reasoning item followed by the message with the answer, and output_text gives you just the answer. usage.output_tokens_details.reasoning_tokens tells you how many tokens the thinking used, which is the number to watch for cost and speed.
Open models can return the text of their reasoning, which is useful for debugging prompts and for audit trails, but show it to end users with care: it can contain discarded ideas and false starts. When you continue a conversation with tool calls, pass reasoning items back with previous_response_id so the model keeps its train of thought. In chat completions, do not resend old reasoning as part of content.
Errors and edge cases
The most common problem is an empty or incomplete answer caused by a token limit that is too low: in Responses the status is incomplete, in chat completions the finish_reason is length. Raise the limit or lower the effort.
Reasoning models take longer before the first visible token, so set client timeouts accordingly and stream if users are waiting. Some sampling settings, such as very high temperature, work against careful reasoning; leave them at their defaults unless you have a reason. Sending reasoning_effort to a model without reasoning support returns a 400 error or is ignored, depending on the model.
Reasoning models: common questions
The questions buyers, developers and legal teams ask us most. Something missing? Ask us directly.
Related
- ResponsesUse the OpenAI Responses API format with open-weight models on inference.eu. Typed output items, built-in tools and multi-turn state, processed in the EU.Endpoints
- Chat completionsSend chat messages to open-weight models with the OpenAI chat completions format. Requests are processed in EU data centres and never used for training.Endpoints
- Structured outputsGet valid JSON that matches your schema from open models with OpenAI-compatible structured outputs. JSON mode, json_schema, strict mode and pitfalls.Guides
- Tool callingLet open models call your functions and APIs with OpenAI-compatible tool calling. Define tools, run the loop, handle arguments, processed in the EU.Guides
Move your AI workloads to EU infrastructure
Tell us which models you use and roughly how much traffic you have. We reply within one working day with pricing and next steps.
- Reply within one working day
- Pricing for your volume
- DPA ready to sign