-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
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
- lacks the granularity of control that Google offers for reasoning
- this is particularly problematic when using prompts in code with the OpenAI client.
load_prompt(...).build(...)returns a dict that includesreasoning_enabledkey 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
Labels
No labels