Skip to content
NotHolyDocs

Guides

Reasoning

Ask the model to think before it answers, and read the reasoning it returns.

View as Markdown

Each model lists the effort levels it accepts in capabilities.reasoning_efforts (see Models). More effort uses more output tokens, which are billed at the output rate. Leave the field out and the model uses its own default.

APIField
Chat completionsreasoning_effort
Responsesreasoning.effort
Messagesthinking: {"type": "enabled", "budget_tokens": N} or {"type": "adaptive"} with output_config.effort
Python
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.notholy.com/v1", api_key=os.environ["NOTHOLY_API_KEY"])

r = client.chat.completions.create(
    model="notholy-specter",
    reasoning_effort="high",
    messages=[{"role": "user", "content": "Is a JWT signed with alg none ever acceptable? Answer in one line."}],
)
print(r.choices[0].message.content)

In chat completions and Responses, a level the model does not list returns 400 invalid_request. Messages maps thinking and output_config.effort to the nearest level the model has: a budget of 16000 tokens or more is high, 4000 or more is medium, less is low, and adaptive is medium.

The reasoning text comes back as reasoning_content in chat completions, as reasoning items in Responses and as thinking blocks in Messages. When you send the conversation back, reasoning from earlier turns is dropped.

Next