Skip to main content
Reasoning models (like OpenAI’s o3 and o4 series) perform internal chain-of-thought processing before generating a final answer. The HasteKit SDK allows you to configure reasoning parameters and access these reasoning steps. Non-reasoning models (such as gpt-4o) do not emit reasoning summaries.

Enabling Reasoning

To use reasoning features, you typically need to use a compatible model and configure the Reasoning parameters in your request. The ReasoningParam struct supports the following fields:
  • Summary (*string): Reasoning summary level: "auto", "concise", or "detailed".
  • Effort (*string): Reasoning effort level: "none", "low", "medium", "high", or "xhigh".
  • BudgetTokens (*int): Maximum tokens to allocate for reasoning steps. Used by Anthropic and Gemini; not used for OpenAI.

Reasoning Output

Reasoning steps are returned as distinct output items, separate from the final text response. You can access them like this:

Streaming Reasoning

When streaming, reasoning steps are emitted as chunks. You can detect when a reasoning item is completed.