Skip to content

Inconsistent max_input_tokens semantics in model_prices_and_context_window.json for GPT-5 family #30928

Closed

Description

@madhu19991

Description

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.

References

  • OpenAI docs for gpt-5: 400,000 context window
  • OpenAI docs for gpt-5-mini: 400,000 context window
  • OpenAI docs for gpt-5.1: 400,000 context window
  • OpenAI docs for gpt-5.4-mini: 400,000 context window

Activity

  1. added a commit that references this issue on Jun 24, 2026
    15462f7
  2. added a commit that references this issue on Jun 26, 2026
    133da06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions