Skip to content

pricing: long-context tier rates (272k threshold) are dropped at snapshot bundling #1076

Closed

Description

@iamtoruk

Split from #1075 (claim 3). LiteLLM carries *_above_272k_tokens tier rates for gpt-5.4/5.5/5.6* (and 200k tiers for some Anthropic models — 237 entries total), but scripts/bundle-litellm.mjs flattens every entry to a fixed 5-slot tuple and discards the tier fields, and calculateCost has no threshold dimension. Measured impact on a large real corpus at the correct 272k threshold: 8 of 45,638 codex calls, +$1.28 (+0.03%) — which is why this is deferred rather than bundled into the #1075 fix. If implemented: must be provider-generic, must use each model's actual threshold from the source (272k for the OpenAI 5.4+ family — NOT 128k; see #1075 verification for why 128k fabricates +64% spend), and requires a snapshot format change with a compat path for old tuples.

Activity

  1. added
    bug
    area: cli
    status: confirmed
    on Sep 14, 2026
  2. added a commit that references this issue on Sep 20, 2026
    9bdea9f
  3. added
    status: has-pr
    on Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: clibugstatus: confirmedstatus: has-pr

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions