Tuna.ai

Reasoning Effort

Reasoning models generate reasoning text before the final answer. reasoning_effort selects a model-specific effort level. Higher effort can improve results on complex tasks, but usually increases response time and the number of billed output tokens.

Request body
{
  "model": "tuna-us/example-lab/example-model-id",
  "messages": [{"role": "user", "content": "How many prime numbers are there below 100?"}],
  "reasoning_effort": "low"
}

Levels

Each model accepts its own set of levels. To see a model's levels, open Details & Examples on its card in Models & Pricing. The models on Tuna accept these:

Level Meaning
low Lower reasoning effort, generally with fewer reasoning tokens and a shorter wait.
high Higher reasoning effort for tasks that benefit from more reasoning.
max The highest reasoning effort level supported by the selected model.

Use lower levels when limiting latency and token usage matters. Evaluate higher levels on tasks where the additional reasoning improves results.

Some models accept more levels, such as none to skip thinking. If you leave reasoning_effort out, the model uses its own default level. Models that don't reason have no thinking to control, so reasoning_effort only applies to reasoning models.

Read the Thinking

The thinking comes back in the reasoning field of the message, separate from the reply in content:

Response
"choices": [
  {
    "message": {
      "role": "assistant",
      "reasoning": "Count the primes in each group of ten: 2, 3, 5, 7 ...",
      "content": "There are 25 prime numbers below 100."
    },
    "finish_reason": "stop"
  }
]
const response = await client.chat.completions.create({
  model: "tuna-us/example-lab/example-model-id",
  messages: [{ role: "user", content: "How many prime numbers are there below 100?" }],
  reasoning_effort: "low",
});
const message = response.choices[0].message;
console.log(message.reasoning);
console.log(message.content);
response = client.chat.completions.create(
    model="tuna-us/example-lab/example-model-id",
    messages=[{"role": "user", "content": "How many prime numbers are there below 100?"}],
    reasoning_effort="low",
)
message = response.choices[0].message
print(message.reasoning)
print(message.content)

When streaming, the thinking arrives first, in delta.reasoning, and then the reply, in delta.content.

Like prompts and replies, the thinking is never stored. See Privacy and ZDR.

Tokens and Billing

Thinking is written by the model, so its tokens are output tokens. They are counted in usage.completion_tokens and billed at the model's output price. See Billing.

The thinking also counts toward max_tokens. If max_tokens is too low, the model can use it all up while thinking. The reply is then cut off, or even empty, and finish_reason is length. A hard problem can use thousands of thinking tokens before the reply starts, so give reasoning models plenty of room, or leave max_tokens out.