Skip to content

fix(openai): support gpt-5.6 reasoning_effort with function tools - #7169

Open
vishal27shetty wants to merge 1 commit into
livekit:mainfrom
vishal27shetty:fix/gpt-5-6-reasoning-effort
Open

fix(openai): support gpt-5.6 reasoning_effort with function tools#7169
vishal27shetty wants to merge 1 commit into
livekit:mainfrom
vishal27shetty:fix/gpt-5-6-reasoning-effort

Conversation

@vishal27shetty

Copy link
Copy Markdown

Problem

gpt-5.6, gpt-5.6-luna, gpt-5.6-sol, and gpt-5.6-terra aren't in ChatModels or
_supports_reasoning_effort(), so the plugin doesn't recognize them as reasoning models at all.

This causes two independent 400s from OpenAI. First, an unspecified reasoning_effort falls
through to the "minimal" default, which this family rejects outright, tools or not:

Unsupported value: 'reasoning_effort' does not support 'minimal' with this model.
Supported values are: 'none', 'low', 'medium', 'high', 'xhigh'.

Second, once function tools are attached, gpt-5.6 requires reasoning_effort to be explicitly
"none" — omitting the parameter also 400s, unlike gpt-5.2/gpt-5.4, which just need it absent:

Function tools with reasoning_effort are not supported for gpt-5.6-luna in
/v1/chat/completions. To use function tools, use /v1/responses or set
reasoning_effort to 'none'.

Changes

  • models.py: register the 4 gpt-5.6 variants in ChatModels and _supports_reasoning_effort;
    add _REASONING_EFFORT_NONE_MODELS, the set of models whose correct default is "none".
  • llm.py: use _REASONING_EFFORT_NONE_MODELS for default selection (previously a hardcoded
    list missing gpt-5.6); add _REASONING_EFFORT_TOOL_REQUIRES_NONE_MODELS and force
    reasoning_effort="none" at request time when tools are attached, scoped to gpt-5.6 only.
  • responses/llm.py: same default-selection fix — the Responses API already accepts tools with
    any reasoning_effort value, verified live, so no coercion is needed there.

Testing

Live against the OpenAI API across all 8 affected models (gpt-5.1, gpt-5.2, gpt-5.4,
gpt-5.4-mini, and all 4 gpt-5.6 variants), with function tools attached, both with no
reasoning_effort set and with an explicit override — 16/16 passing. Confirmed
_REASONING_EFFORT_TOOL_REQUIRES_NONE_MODELS contains only the 4 gpt-5.6 models by inspecting
it directly at runtime; gpt-5.1/5.2/5.4/5.4-mini are unaffected.

Screenshot 2026-09-08 at 3 05 55 PM

@vishal27shetty
vishal27shetty requested a review from a team as a code owner September 8, 2026 10:14
@CLAassistant

CLAassistant commented Sep 8, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@vishal27shetty
vishal27shetty force-pushed the fix/gpt-5-6-reasoning-effort branch from 61bb8ae to 11cb441 Compare September 8, 2026 10:22
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.

2 participants