You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inconsistent max_input_tokens semantics in model_prices_and_context_window.json for GPT-5 family #30928
model_prices_and_context_window.json has inconsistent values for max_input_tokens across the GPT-5 model family, suggesting the field is being set with two different semantics — sometimes as the full context window size, sometimes as context_window - max_output_tokens.
Evidence
Model
max_input_tokens
max_tokens (output)
Published context window
max_input_tokens = context window?
gpt-4o
128,000
16,384
128,000
✅ yes
gpt-4.1
1,047,576
32,768
1,047,576
✅ yes
gpt-5.4
1,050,000
128,000
1,050,000
✅ yes
gemini/gemini-2.5-flash
1,048,576
65,535
1,048,576
✅ yes
gpt-5
272,000
128,000
400,000
❌ no (= 400k - 128k)
gpt-5-mini
272,000
128,000
400,000
❌ no (= 400k - 128k)
gpt-5.1
272,000
128,000
400,000
❌ no (= 400k - 128k)
gpt-5.4-mini
272,000
128,000
400,000
❌ no (= 400k - 128k)
The 272,000 values appear to be 400,000 - 128,000, i.e. context_window - max_output_tokens. But for all other models in the file (gpt-4o, gpt-4.1, gpt-5.4, Gemini), max_input_tokens equals the full published context window.
Question / Clarification Needed
What is the intended semantic of max_input_tokens?
Option A — context window size: max_input_tokens = full published context window. In this case gpt-5, gpt-5-mini, gpt-5.1, gpt-5.4-mini should all be 400,000 (not 272,000).
Option B — net input capacity: max_input_tokens = context_window - max_output_tokens. In this case gpt-5.4 should be 922,000 (not 1,050,000) and gpt-4o should be 111,616 (not 128,000) — but this would break many existing entries.
Option A appears to be the dominant convention throughout the file. The 272,000 entries for the GPT-5 base family look like a data entry error where the net capacity was computed and stored instead of the raw context window.
Activity
fix: correct context window tokens for GPT-5 Pro and GPT-5.4 Mini/Nano
chore: litellm oss staging (BerriAI#31185)