fix(pricing): add supports_web_search for OpenAI gpt-5.1/5.2/5.3 chat models#22934
Conversation
OpenAI gpt-5.1, gpt-5.2, and gpt-5.3 chat models all support the `web_search_options` parameter, but the model cost registry was missing the `supports_web_search` flag. Only `gpt-5.2-pro` had it set. Models updated: - gpt-5.1, gpt-5.1-2025-11-13, gpt-5.1-chat-latest - gpt-5.2, gpt-5.2-2025-12-11, gpt-5.2-chat-latest - gpt-5.3-chat-latest
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR is a targeted data-only fix that adds
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds supports_web_search: true to 7 OpenAI gpt-5.1/5.2/5.3 chat-mode models; note that gpt-5.4 and gpt-5.4-2026-03-05 (which also list /v1/chat/completions in supported_endpoints) are not updated |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[model_prices_and_context_window.json] --> B[gpt-5.1]
A --> C[gpt-5.1-2025-11-13]
A --> D[gpt-5.1-chat-latest]
A --> E[gpt-5.2]
A --> F[gpt-5.2-2025-12-11]
A --> G[gpt-5.2-chat-latest]
A --> H[gpt-5.3-chat-latest]
A --> I[gpt-5.2-pro / gpt-5.2-pro-2025-12-11]
A --> J[gpt-5.4 / gpt-5.4-2026-03-05]
B -- "supports_web_search: true ✅ ADDED" --> K[web_search_options supported]
C -- "supports_web_search: true ✅ ADDED" --> K
D -- "supports_web_search: true ✅ ADDED" --> K
E -- "supports_web_search: true ✅ ADDED" --> K
F -- "supports_web_search: true ✅ ADDED" --> K
G -- "supports_web_search: true ✅ ADDED" --> K
H -- "supports_web_search: true ✅ ADDED" --> K
I -- "supports_web_search: true ✅ Already set" --> K
J -- "supports_web_search: ❓ Not updated" --> L[Flag potentially missing]
Comments Outside Diff (1)
-
model_prices_and_context_window.json, line 20863 (link)gpt-5.4/gpt-5.4-2026-03-05may be missingsupports_web_searchBoth
gpt-5.4(line 20863) andgpt-5.4-2026-03-05(line 20899) end their property lists withoutsupports_web_search, even though both declare/v1/chat/completionsin theirsupported_endpoints. If these models supportweb_search_optionsvia the chat completions path (consistent with gpt-5.1/5.2/5.3 receiving the flag here), they would need the same addition.This PR is intentionally scoped to "chat mode" models (
mode: "chat"), and bothgpt-5.4entries carrymode: "responses"— so the omission may be deliberate. It is worth confirming whetherweb_search_optionsis also available for these two models when called via/v1/chat/completions, and if so, adding the flag in a follow-up.
Last reviewed commit: 9bbe15f
Relevant issues
Pre-Submission checklist
tests/test_litellm/directory — N/A, JSON-only data fixmake test-unitType
🐛 Bug Fix
Changes
OpenAI gpt-5.1, gpt-5.2, and gpt-5.3 chat models all support the
web_search_optionsparameter (docs), but the model cost registry was missing thesupports_web_searchflag. Onlygpt-5.2-prohad it set correctly.Models updated (OpenAI provider only):
gpt-5.1,gpt-5.1-2025-11-13,gpt-5.1-chat-latestgpt-5.2,gpt-5.2-2025-12-11,gpt-5.2-chat-latestgpt-5.3-chat-latest