Skip to content

fix: add missing capability fields for gpt-5.4 variants#23645

Open
ghost wants to merge 1 commit intomainfrom
krrishdholakia/fix-gpt54-capability-fields
Open

fix: add missing capability fields for gpt-5.4 variants#23645
ghost wants to merge 1 commit intomainfrom
krrishdholakia/fix-gpt54-capability-fields

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Mar 14, 2026

Summary

  • Adds missing supports_none_reasoning_effort and supports_xhigh_reasoning_effort fields to gpt-5.4-2026-03-05 and all Azure/ChatGPT gpt-5.4 variants
  • Without these fields, _supports_factory lookups return False, breaking reasoning_effort and temperature handling for users pinning to these model snapshots/providers

Relevant issues

Follow-up fix for #22953

Pre-Submission checklist

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🐛 Bug Fix

Changes

Added supports_none_reasoning_effort and supports_xhigh_reasoning_effort to 7 model entries in both model_prices_and_context_window.json and its backup copy.

🤖 Generated with Claude Code

gpt-5.4-2026-03-05 and all azure/chatgpt gpt-5.4 variants were missing
supports_none_reasoning_effort and supports_xhigh_reasoning_effort fields,
causing _supports_factory lookups to silently return False and break
reasoning_effort and temperature handling for those models.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 14, 2026

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

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Mar 14, 2026 6:29pm

Request Review

Copy link
Copy Markdown

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

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: b16aeb34de

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

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

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +16701 to +16704
"supports_none_reasoning_effort": false,
"supports_xhigh_reasoning_effort": true,
"supports_none_reasoning_effort": true,
"supports_xhigh_reasoning_effort": true,
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 Remove conflicting duplicate capability flags

This change adds supports_none_reasoning_effort and supports_xhigh_reasoning_effort twice (with contradictory values) inside the global.anthropic.claude-sonnet-4-5-20250929-v1:0 object, even though the commit is scoped to GPT-5.4 variants. Duplicate JSON keys are parser-dependent (first wins, last wins, or rejection), so this can make Claude capability detection inconsistent across environments and accidentally alter reasoning-effort behavior for this Bedrock model.

Useful? React with 👍 / 👎.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 14, 2026

Greptile Summary

This PR adds supports_none_reasoning_effort and supports_xhigh_reasoning_effort capability flags to gpt-5.4 model entries in both model_prices_and_context_window.json and its backup, following the established pattern of keeping model-specific flags in the JSON config (read via get_model_info) rather than hardcoding them in source code.

Changes:

  • Correctly adds supports_none_reasoning_effort: true / supports_xhigh_reasoning_effort: true to azure/gpt-5.4, azure/gpt-5.4-2026-03-05, gpt-5.4-2026-03-05, and gpt-5.4
  • Correctly adds supports_none_reasoning_effort: false / supports_xhigh_reasoning_effort: true to azure/gpt-5.4-pro and azure/gpt-5.4-pro-2026-03-05 (responses-API-only models)
  • Bug: Accidentally introduces duplicate JSON keys (supports_none_reasoning_effort and supports_xhigh_reasoning_effort) in the global.anthropic.claude-sonnet-4-5-20250929-v1:0 entry — a Claude Bedrock model completely unrelated to gpt-5.4. The entry first declares false then immediately true for supports_none_reasoning_effort, which is invalid per RFC 8259 and may be rejected by strict JSON parsers. Both files are affected.

Confidence Score: 2/5

  • Not safe to merge — the PR introduces invalid JSON (duplicate keys) in both config files, and unintentionally modifies a Claude model entry unrelated to the stated gpt-5.4 fix.
  • Six of the seven gpt-5.4 model entry updates are correct, but the seventh change (in the global.anthropic.claude-sonnet-4-5-20250929-v1:0 entry) introduces duplicate JSON keys with conflicting values (false then true). Duplicate keys are invalid JSON per RFC 8259, and strict parsers will reject the entire file. Additionally, this Claude model entry appears to have been modified unintentionally — it is not a gpt-5.4 variant.
  • Both model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json around line 16701 (the global.anthropic.claude-sonnet-4-5-20250929-v1:0 entry).

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds supports_none_reasoning_effort and supports_xhigh_reasoning_effort to 6 model entries correctly, but introduces duplicate JSON keys in the global.anthropic.claude-sonnet-4-5-20250929-v1:0 entry (a Claude model unrelated to gpt-5.4), which is invalid JSON per RFC 8259.
litellm/model_prices_and_context_window_backup.json Identical change set as the primary JSON file — same correct gpt-5.4 additions and same duplicate-key bug in the global.anthropic.claude-sonnet-4-5-20250929-v1:0 Bedrock Claude entry.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[gpt-5.4 model request] --> B{supports_none_reasoning_effort?}
    B -->|lookup via get_model_info| C[model_prices_and_context_window.json]
    C --> D{Model entry}
    D -->|azure/gpt-5.4| E[true]
    D -->|azure/gpt-5.4-2026-03-05| F[true]
    D -->|azure/gpt-5.4-pro| G[false]
    D -->|azure/gpt-5.4-pro-2026-03-05| H[false]
    D -->|gpt-5.4-2026-03-05| I[true]
    D -->|global.anthropic.claude-sonnet-4-5| J["❌ DUPLICATE KEY\nfalse → true (last wins)"]
    E & F & I --> K[reasoning_effort + temperature handling works]
    G & H --> L[xhigh supported, none blocked]
    J --> M[JSON spec violation - may break strict parsers]
Loading

Last reviewed commit: b16aeb3

Comment on lines +16701 to +16704
"supports_none_reasoning_effort": false,
"supports_xhigh_reasoning_effort": true,
"supports_none_reasoning_effort": true,
"supports_xhigh_reasoning_effort": true,
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.

Duplicate JSON keys for wrong model entry

The global.anthropic.claude-sonnet-4-5-20250929-v1:0 model entry now contains two conflicting entries for both supports_none_reasoning_effort and supports_xhigh_reasoning_effort:

"supports_none_reasoning_effort": false,
"supports_xhigh_reasoning_effort": true,
"supports_none_reasoning_effort": true,
"supports_xhigh_reasoning_effort": true,

Duplicate keys are not valid per the JSON specification (RFC 8259). While Python's json.loads() silently uses the last-defined value (true), strict JSON parsers will reject this, and linters/validators will flag it. The intended final state appears to be true for both, so the first duplicate pair should be removed:

Suggested change
"supports_none_reasoning_effort": false,
"supports_xhigh_reasoning_effort": true,
"supports_none_reasoning_effort": true,
"supports_xhigh_reasoning_effort": true,
"supports_none_reasoning_effort": true,
"supports_xhigh_reasoning_effort": true,

Additionally, this model (global.anthropic.claude-sonnet-4-5-20250929-v1:0) is a Claude Sonnet 4.5 Bedrock entry, not a gpt-5.4 variant — it appears to have been modified unintentionally by this PR. The same duplicate-key issue exists at the same line range in litellm/model_prices_and_context_window_backup.json.

Comment on lines +16701 to +16704
"supports_none_reasoning_effort": false,
"supports_xhigh_reasoning_effort": true,
"supports_none_reasoning_effort": true,
"supports_xhigh_reasoning_effort": true,
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.

Same duplicate-key bug in backup file

This file has the identical duplicate-key problem for global.anthropic.claude-sonnet-4-5-20250929-v1:0:

"supports_none_reasoning_effort": false,
"supports_xhigh_reasoning_effort": true,
"supports_none_reasoning_effort": true,
"supports_xhigh_reasoning_effort": true,

The fix here is the same — remove the first (false) pair and retain only the intended values:

Suggested change
"supports_none_reasoning_effort": false,
"supports_xhigh_reasoning_effort": true,
"supports_none_reasoning_effort": true,
"supports_xhigh_reasoning_effort": true,
"supports_none_reasoning_effort": true,
"supports_xhigh_reasoning_effort": true,

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.

0 participants