Skip to content

fix(providers): omit temperature for always-reasoning models - #286

Merged
Zongwei9888 merged 1 commit into
HKUDS:mainfrom
remote-controlled-man:codex/prflow-d1bd25b3c3d2
Nov 16, 2026
Merged

Zongwei9888 merged 1 commit into
HKUDS:mainfrom
remote-controlled-man:codex/prflow-d1bd25b3c3d2

Conversation

@remote-controlled-man

Copy link
Copy Markdown
Contributor

Fixes #285.

With reasoning effort left on Auto, OpenAI-compatible requests still included temperature for older GPT-5 and o-series models that reject it. Omit the parameter for these always-reasoning model families in both Chat Completions and Responses requests. Keep the existing behavior for later GPT-5.x and GPT-5 Chat models, and preserve explicit compat.temperature overrides.

Add HTTP request-level regression coverage for both protocols and compatibility boundaries, plus a changelog entry.

Validation on macOS / Python 3.12:

  • Full Python suite: 3074 passed, 17 skipped.
  • Desktop test suite (npm test): 51 files, 355 tests passed.
  • pre-commit run --all-files, pip check, Desktop lint, typecheck and protocol checks passed.

Python tests ran with the project virtualenv on PATH and TERM=xterm-256color; TERM=dumb triggers a different prompt-toolkit Ctrl-C path in an existing terminal test. Provider tests use a local mock HTTP transport; no live model requests were made.

Copilot AI balanced review requested due to automatic review settings October 30, 2026 08:19

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@Zongwei9888
Zongwei9888 merged commit 36a7ec7 into HKUDS:main Nov 16, 2026
Zongwei9888 added a commit that referenced this pull request Nov 16, 2026
@Zongwei9888

Copy link
Copy Markdown
Contributor

Merged on 2026-11-16 as 782d5fb ("Merge PR #286"), fixes #285. Thanks for tracking this down, and for the request-level tests on both protocols!

We reproduced it on main: with Auto effort, gpt-5, gpt-5-mini, o3 and o4-mini all went out with temperature. Your test fails on main and passes here.

We checked the rule against 36 model names. It matches OpenAI's current behaviour:

  • gpt-5.1 and later accept temperature at their default none;
  • gpt-5-chat isn't a reasoning model;
  • explicit compat.temperature overrides still win.

We added one small follow-up, cb55c51. It moves the pattern next to _REASONING_MODEL_TOKENS as a named constant with an always_reasons() helper; behaviour is unchanged.

The CHANGELOG hunk conflicted with newer entries, so it is folded into the 2026-11-16 "Community fixes" entry, in both languages.

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.

[Bug]: Auto reasoning effort sends temperature to o4-mini / gpt-5 (400)

3 participants