Skip to content

reasoning_enabled and reasoning_budget invalid kwargs in Prompt.build #262

@tylerganter

Description

@tylerganter

Calling OpenAI's chat completions I get the following error when running this example straight from the docs.

Example Code

Non-streaming request with reasoning parameters

Error

Non-streaming Response:
Error during non-streaming request: Completions.create() got an unexpected keyword argument 'reasoning_enabled'. Did you mean 'reasoning_effort'?

Dependency Tree

braintrust-proxy v0.1.0
    ├── openai v1.91.0
    │   ├── anyio v4.9.0
    │   │   ├── idna v3.10
    │   │   └── sniffio v1.3.1
    │   ├── distro v1.9.0
    │   ├── httpx v0.28.1
    │   │   ├── anyio v4.9.0 (*)
    │   │   ├── certifi v2025.6.15
    │   │   ├── httpcore v1.0.9
    │   │   │   ├── certifi v2025.6.15
    │   │   │   └── h11 v0.16.0
    │   │   └── idna v3.10
    │   ├── jiter v0.10.0
    │   ├── pydantic v2.11.7
    │   │   ├── annotated-types v0.7.0
    │   │   ├── pydantic-core v2.33.2
    │   │   │   └── typing-extensions v4.14.0
    │   │   ├── typing-extensions v4.14.0
    │   │   └── typing-inspection v0.4.1
    │   │       └── typing-extensions v4.14.0
    │   ├── sniffio v1.3.1
    │   ├── tqdm v4.67.1
    │   └── typing-extensions v4.14.0
    └── pydantic v2.11.7 (*)

Context and Urgency

The call works if I replace reasoning_enabled and reasoning_budget with reasoning_effort but

  1. lacks the granularity of control that Google offers for reasoning
  2. this is particularly problematic when using prompts in code with the OpenAI client. load_prompt(...).build(...) returns a dict that includes reasoning_enabled key so prompts cannot be used with reasoning and the OpenAI SDK!

I would also note that if you modify and save the prompt multiple times it causes reasoning_enabled to appear, so this issue will not surface unless params are modified for the prompt.

1. create prompt, don't configure reasoning

{
    'temperature': 0,
    'model': 'gemini-2.5-flash',
    'span_info': {
        'metadata': {
            'prompt': {...}
        }
    },
    'messages': [{'content': 'You are a helpful assistant', 'role': 'system'}]
}

2. enable reasoning

{
    'temperature': 0,
    'reasoning_enabled': True,
    'model': 'gemini-2.5-flash',
    'span_info': {
        'metadata': {
            'prompt': {...}
        }
    },
    'messages': [{'content': 'You are a helpful assistant', 'role': 'system'}]
}

3. disable reasoning

{
    'temperature': 0,
    'reasoning_enabled': False, # <-- same functionality as (1) but this kwarg wasn't there before!
    'model': 'gemini-2.5-flash',
    'span_info': {
        'metadata': {
            'prompt': {...}
        }
    },
    'messages': [{'content': 'You are a helpful assistant', 'role': 'system'}]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions