Skip to content

fix: llms/openai temperature+reasoning_effort for GPT-5 models#1499

Open
feizhe1996 wants to merge 1 commit into
tmc:mainfrom
feizhe1996:none_reasoning_effort_chatgpt
Open

fix: llms/openai temperature+reasoning_effort for GPT-5 models#1499
feizhe1996 wants to merge 1 commit into
tmc:mainfrom
feizhe1996:none_reasoning_effort_chatgpt

Conversation

@feizhe1996
Copy link
Copy Markdown

@feizhe1996 feizhe1996 commented May 22, 2026

Fix a bug where temperature=0 was silently dropped for reasoning models even when reasoning_effort="none" (which disables reasoning and makes temperature configurable again). The MarshalJSON guard now only omits temperature when reasoning is actually active (ReasoningEffort != "none").

Add reasoning_effort support for gpt-5.4 and later (gpt-5.[4-9]): valid values are none, low, medium, high, xhigh. Other GPT-5 variants and all o-series models continue to send no reasoning_effort parameter.

#1497

PR Checklist

  • Read the Contributing documentation.
  • Read the Code of conduct documentation.
  • Name your Pull Request title clearly, concisely, and prefixed with the name of the primarily affected package you changed according to Good commit messages (such as memory: add interfaces for X, Y or util: add whizzbang helpers).
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. Fixes #123).
  • Describes the source of new concepts.
  • References existing implementations as appropriate.
  • Contains test coverage for new functions.
  • Passes all golangci-lint checks.

Fix a bug where temperature=0 was silently dropped for reasoning models
even when reasoning_effort="none" (which disables reasoning and makes
temperature configurable again). The MarshalJSON guard now only omits
temperature when reasoning is actually active (ReasoningEffort != "none").

Add reasoning_effort support for gpt-5.4 and later (gpt-5.[4-9]):
valid values are none, low, medium, high, xhigh. Other GPT-5 variants
and all o-series models continue to send no reasoning_effort parameter.
@feizhe1996 feizhe1996 changed the title [BUG] llms/openai: fix temperature+reasoning_effort for GPT-5 models fix: llms/openai temperature+reasoning_effort for GPT-5 models May 22, 2026
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