Skip to main content
Applies to:


Summary

Issue: When using the Braintrust SDK to fetch prompts configured for GPT-5 models, the returned prompt parameters include temperature: 0 even though GPT-5 models don’t support the temperature parameter. This causes errors when passing these parameters directly to OpenAI’s API. Cause: Braintrust prompt storage includes temperature parameters for all models, but GPT-5 models reject any temperature setting in API calls. Resolution: Filter out the temperature parameter from prompt parameters before sending to OpenAI, or use Braintrust’s AI proxy which handles this automatically.

Resolution Steps

Step 1: Remove temperature from fetched parameters

Filter out the temperature parameter when using GPT-5 models before calling OpenAI.

Option 2: Use Braintrust AI proxy

Step 1: Use wrap_openai instead

TODO: Verify if using the wrapped OpenAI client automatically filters unsupported parameters like temperature for GPT-5 models.