Skip to content

Allow GPT-5 temperature with reasoning none#941

Open
Everett Smith (evrtt) wants to merge 1 commit into
mainfrom
fix/allow-temperature-for-gpt-5-with-reasoning-effort-none
Open

Allow GPT-5 temperature with reasoning none#941
Everett Smith (evrtt) wants to merge 1 commit into
mainfrom
fix/allow-temperature-for-gpt-5-with-reasoning-effort-none

Conversation

@evrtt

@evrtt Everett Smith (evrtt) commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Context

PR #16823 updates api-ts to preserve temperature for GPT-5 prompts when reasoning_effort is explicitly set to "none". The proxy was still stripping temperature for GPT-5/reasoning-model requests before forwarding them, so proxied OpenAI-format requests would not get the benefit of that fix.

Changes

Update the OpenAI proxy path to preserve temperature for GPT-5 requests when reasoning_effort === "none", while continuing to remove temperature for GPT-5 requests where reasoning is still enabled. This is implemented by adding a canKeepTemperature check in repos/braintrust-proxy/packages/proxy/src/proxy.ts:2370 and only deleting temperature when that condition is false.

Testing

Add coverage in repos/braintrust-proxy/packages/proxy/src/providers/openai.test.ts:371 for both cases:

  • GPT-5.5 with reasoning_effort: "none" preserves temperature in the translated /responses request
  • GPT-5.5 with reasoning_effort: "low" continues to omit temperature

@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-proxy Ready Ready Preview, Comment Jul 9, 2026 5:56pm

Request Review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 70a68fffe9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "Codex (@codex) address that feedback".

Comment on lines +2370 to +2374
const canKeepTemperature =
typeof bodyData?.model === "string" &&
bodyData.model.toLowerCase().includes("gpt-5") &&
Object.prototype.hasOwnProperty.call(bodyData, "reasoning_effort") &&
bodyData.reasoning_effort === "none";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Move request-shaping fix to gateway

This repository is the deprecated proxy, and /workspace/braintrust-proxy/AGENTS.md says model routing, provider translation, and request/response shaping fixes belong in ../gateway/ with only model_list.json changes valid here. This change alters OpenAI request shaping in proxy.ts, so it updates deprecated proxy code/tests instead of the gateway path that should receive this behavior.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant