It is safe to say that “reasoning” has been one of the most discussed new features of large language models. Since we find it interesting too, it is our will to let you know how to enhance your use of it through Regolo.
What is “reasoning” in models?
A reasoning model is a type of LLM that, instead of providing the first answer it calculates through a statistical process, follows a more complex approach. It generates its response through a ‘chain of thought,’ allowing it to produce a more accurate and contextually appropriate answer.
This is particularly useful when you need the model to ‘reason’ about your input for greater accuracy—especially if your query is highly specific or requires step-by-step problem-solving.
Here is an infographic from OpenAI explaining how a reasoning model works:

As you can see, this describes how a reasoning model with a context window of 128k tokens works during a chat with a user: on every turn, input and output of the models are preserved, and the reasoning gets discarded (this explains why reasoning tokens often get billed as output tokens).
Which reasoning model did we choose?
When choosing a reasoning model for Regolo, we considered the most powerful models that could run efficiently on our infrastructure. We wanted a model you can use for complex tasks (within its capabilities) and that could still be as general purpose as possible; with this in mind, we have decided to go for one of the most interesting and open models we had access to: “DeepSeek-R1-Distill-Qwen-32B”. A distilled checkpoint of DeepSeek-R1 based on Qwen2.5-32B.
Setting up your environment
The first step is to generate a secret key for Regolo:
- Sign in to Regolo and click on ‘Create New Key’
- Decide the name of your key and select the models you want to use (you select “All Models” or only “DeepSeek-R1-Distill-Qwen-32B”)
- Tap on “Create Key” and copy your secret key
Then we want to decide how to interact with the model: said that we support the openAI API standard, you are allowed to use any openAI compatible client.
Making a request
Considering that we want to keep this example as general as possible, here are two equivalent versions of the request, using cURL and our python client.
- cURL (Client for URL) is a widely used command-line tool for making network requests using URLs.We can use it to directly interrogate the regolo endpoints:
curl --request POST \
--url https://api.regolo.ai/v1/chat/completions \
--header 'Authorization: Bearer <Your secret key>' \
--header 'Content-Type: application/json' \
--data '{
"model": "DeepSeek-R1-Distill-Qwen-32B",
"messages": [
{
"role": "user",
"content": "Hi! Could you tell me something about Rome?"
}
]
}'
Code language: PHP (php)
- Alternatively, you can interact with regolo.ai using our ‘regolo’ Python module, which utilizes
httpx
for making requests to our endpoints:
# Import regolo module
import regolo
# Setup the module to work with DeepSeek
regolo.default_key = "<Your secret key>"
regolo.default_model = "DeepSeek-R1-Distill-Qwen-32B"
# Instantiate the client
client = regolo.RegoloClient()
client.add_prompt_to_chat(role="user", prompt="Hi! Could you tell me something about Rome?")
# Perform the request and print the answer
answer = client.run_chat()
print(answer)
Code language: Python (python)
If you perform a query to DeepSeek-R1-Distill-Qwen-32B as described, you will get the reasoning steps followed by the actual output of the model.
Let’s take a look at the output from the previous example:
Alright, the user has asked about Rome. I need to provide a comprehensive overview.
First, I should start with the basics: Rome’s status as Italy’s capital and a historical superpower.
Mention its rich history, including the Roman Republic and Empire, which were pivotal in shaping Western civilization.
Talk about famous landmarks like the Colosseum, Roman Forum, and Vatican City. It’s important to highlight their significance.
Don’t forget to include Rome’s contributions to culture, art, and religion – the Renaissance and the Catholic Church’s influence are key points.
Overall, I’ll make the response engaging and informative, ensuring it covers the essentials without being too overwhelming.
</think>
Rome is a city rich in history, culture, and significance. It’s the capital of Italy and a global hub for art, history, and education. Known as the ” Eternal City,” Rome has been a superpower since ancient times and remains influential today. Its historical sites like the Colosseum, Roman Forum, and Vatican City attract millions of visitors. Rome also played a central role in the Renaissance, contributing to art and science. It’s a blend of ancient ruins and modern life, a place where history and culture collide.
We can easily verify the model output is split in two by the “</think>” delimiter. Before the delimiter, you can see the reasoning section of the output, while in the other section, it is possible to read the final response of the model.
Final words
To summarize, we explored how reasoning models work and how to use them with Regolo.
If you’d like for us to write about some topics, or want clarifying on how to interact with particular services through regolo, you can always reach to us through our official channels.
If you want to know more about using reasoning in LLMs, here are some useful links: