Repository navigation
fix(chatgpt): map gpt-5.4-mini to responses - #32291
itsreverence wants to merge 1 commit into
Conversation
Greptile SummaryAdds the missing
Confidence Score: 5/5Safe to merge — the change is confined to two JSON data files and one new test file with no production code modifications. The JSON entries are well-formed, structurally consistent with every adjacent chatgpt/* model, and cross-verified between root and backup files. The 272k input-token limit correctly differs from gpt-5.4's 1,050k limit and aligns with the model catalog cited in the PR. The new test file exercises both data files and the bridge function using monkeypatching only — no network calls — and the TypeAlias import is valid under the project's >=3.10 Python requirement. No routing logic, handler code, or existing tests were modified. No files require special attention.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds chatgpt/gpt-5.4-mini entry with 272k input tokens, 128k output, mode responses, and both /v1/chat/completions and /v1/responses endpoints, matching the established pattern of chatgpt/gpt-5.4. |
| litellm/model_prices_and_context_window_backup.json | Identical chatgpt/gpt-5.4-mini entry added to the bundled backup map, keeping local fallback mode consistent with the root map. |
| tests/test_litellm/test_chatgpt_model_config.py | New test file with two test functions: a parametrized sync test asserting both root and backup maps have the correct entry, and a monkeypatched bridge test verifying responses_api_bridge_check returns mode responses for this model. No real network calls. |
Reviews (3): Last reviewed commit: "fix(chatgpt): map gpt-5.4-mini to respon..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
de100f2 to
e766f7a
Compare
e766f7a to
97ae9ad
Compare
|
Addressed the Greptile token-limit note in the latest commit. The initial entry copied the full Also moved the entry into the existing ChatGPT model block, added the same metadata to the bundled backup model map, and added regression coverage for both map consistency and the Responses bridge path. Local verification: @greptileai please re-review the latest commit. |
|
Thanks for picking this back up and requesting review. Before you spend more time on it, I rechecked That matches OpenAI’s retirement notice for this access path. API-key access is unaffected, but this PR specifically adds the Given that result, I think we can close this unless there’s a remaining compatibility reason to keep the registration. Would you prefer that? |
Relevant issues
Partially addresses #25954
Related but separate: #28044 covers DB-registered ChatGPT response-mode models skipping the ChatGPT Responses config path
Linear ticket
Pre-Submission checklist
@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewDelays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review)
Screenshots / Proof of Fix
Reproduction before this model map entry, using current LiteLLM with ChatGPT OAuth:
LiteLLM routes the unmapped model through
/backend-api/codex/chat/completions, which returns a Cloudflare HTML challenge instead of the Codex Responses API SSE streamThe same account and token succeeds when calling the Codex Responses API directly with
model: gpt-5.4-mini; the model catalog endpoint listsgpt-5.4-miniwithsupported_in_api: true,context_window: 272000, andmax_context_window: 272000Local verification from this branch:
Output:
Also validated JSON syntax, added cost-map and bridge regression coverage for root and bundled backup maps, ran
uv run --with pytest python -m pytest tests/test_litellm/test_chatgpt_model_config.py -q, and ranmake pre-commitType
Bug Fix
Test
Changes
Adds the missing
chatgpt/gpt-5.4-minimodel-cost entry and marks it as a Responses API model for the ChatGPT provider, matching the existing ChatGPT provider routing pattern while using the Codex model catalog's 272k input context valueAdds the same entry to the bundled backup map so local fallback mode resolves the model consistently
Adds focused regression coverage that checks the root and bundled backup entries stay in sync for provider, mode, limits, endpoints, and capabilities, plus a bridge-path assertion that chat completions for the model are treated as Responses API calls