Skip to main content
Reasoning models like OpenAI’s o4, Anthropic’s Claude 3.5 Sonnet, and Google’s Gemini 2.5 Flash generate intermediate thinking steps before producing final responses. Braintrust provides unified support for these models across providers.
Self-hosted deployments require v0.0.74 or later for reasoning support.

Configure reasoning

Three parameters control reasoning behavior:
  • reasoning_effort: Intensity of reasoning. Compatible with OpenAI’s parameter. Supported values depend on the model. Most reasoning models accept low, medium, and high. Gemini 3 models in Google format also accept minimal.
  • reasoning_enabled: Boolean to explicitly enable or disable reasoning output. Has no effect on OpenAI models, which default to “medium”.
  • reasoning_budget: Token budget for reasoning. Use either reasoning_effort or reasoning_budget, not both.
In the playground, Gemini 3 models in Google format expose only reasoning_effort.

Use in code

Braintrust provides type augmentation for reasoning parameters:
  • TypeScript: @braintrust/proxy/types extends OpenAI SDK types
  • Python: braintrust-proxy provides casting utilities and type-safe helpers

Basic usage

Reasoning structure

Reasoning steps include unique IDs and content:
The id field contains provider-specific signatures that must be preserved in multi-turn conversations. Always use exact IDs returned by the provider.

Stream reasoning

Reasoning streams through delta.reasoning in streaming responses:

Multi-turn conversations

Include reasoning from previous turns to let models build on earlier thinking:

Test in playgrounds

Use playgrounds to test reasoning models interactively:
  1. Select a reasoning-capable model
  2. Set reasoning_effort in parameters
  3. Run evaluations
  4. View reasoning steps in trace view
Reasoning steps appear as separate spans in the trace, making it easy to understand the model’s thinking process.

Evaluate reasoning quality

Create scorers that evaluate both final outputs and reasoning steps:
This helps you understand whether models are using sound reasoning paths to reach conclusions.

Next steps