Skip to content

Add pricing for missing legacy/current OpenAI models (gpt-4o-mini, gpt-4o, gpt-4.1 family) - #4

Merged
VasiliyRad merged 2 commits into
PioneerSquareLabs:mainfrom
VasiliyRad:add-gpt-4o-mini-pricing
Jul 22, 2026
Merged

Add pricing for missing legacy/current OpenAI models (gpt-4o-mini, gpt-4o, gpt-4.1 family)#4
VasiliyRad merged 2 commits into
PioneerSquareLabs:mainfrom
VasiliyRad:add-gpt-4o-mini-pricing

Conversation

@VasiliyRad

@VasiliyRad VasiliyRad commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Several real, currently-active OpenAI models were missing from the price catalog, so calls using them showed up as unpriced ("N calls could not be priced — update prices.yaml"). Added the standard catalog entry for each, following the existing OpenAI-entry conventions (input_includes_cache_read, openai-api channel, source_url, 50% batch discount matching every other OpenAI entry already in this catalog).

All pricing was confirmed against OpenAI's own per-model docs (developers.openai.com), not just third-party trackers:

Model Input Cached input Output Notes
gpt-4o-mini $0.15/1M $0.075/1M $0.60/1M Active since launch (2024-07-18), price unchanged
gpt-4o $2.50/1M $1.25/1M $10.00/1M effective_from set to 2024-08-06 (the price-cut date), not the 2024-05-13 launch date, since launch pricing was higher — using the cut date avoids mispricing pre-cut historical rows rather than silently overcharging them
gpt-4.1 $2.00/1M $0.50/1M $8.00/1M Active since launch (2025-04-14), no known price change since
gpt-4.1-mini $0.40/1M $0.10/1M $1.60/1M Same
gpt-4.1-nano $0.10/1M $0.025/1M $0.40/1M Same

input_includes_cache_read: true is set on all of them, per docs/prices.md's documented convention for OpenAI entries — OpenAI's usage reporting includes cached tokens inside prompt_tokens, so cached tokens must be deducted from billable input rather than charged twice.

Test plan

  • Added test_gpt_4o_mini_is_priced (verifies the cache-read deduction math) and a parametrized test_legacy_openai_models_are_priced covering all four additional models.
  • Full suite passes locally (22/22).

🤖 Generated with Claude Code

VasiliyRad and others added 2 commits July 22, 2026 16:14
gpt-4o-mini calls were landing as unpriced ("could not be priced")
since it wasn't in the catalog. Added the standard entry with current
per-model pricing confirmed against OpenAI's docs (developers.openai.com,
model snapshot 2024-07-18, status active):

  input: $0.15/1M, cached input: $0.075/1M, output: $0.60/1M
  batch: $0.075/1M input, $0.30/1M output (standard 50% batch discount)

input_includes_cache_read is set, consistent with the other OpenAI
entries in this catalog and documented in docs/prices.md — OpenAI's
usage reporting includes cached tokens inside prompt_tokens, so cached
tokens must be deducted from billable input rather than charged twice.

effective_from is the model's real launch date (2024-07-18) rather than
today, so historical rows using this model price correctly too.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Same gap as gpt-4o-mini: these are real, currently-active OpenAI
models (confirmed via developers.openai.com per-model docs) commonly
seen in production traces from teams not yet on the gpt-5.6 family,
but they weren't in the catalog.

Pricing per OpenAI's docs:
  gpt-4o:        $2.50 in / $1.25 cached / $10.00 out (since 2024-08-06
                 price cut; the 2024-05-13 launch price was higher, so
                 effective_from is set to the cut date rather than
                 launch to avoid mispricing pre-cut historical rows)
  gpt-4.1:       $2.00 in / $0.50 cached / $8.00 out
  gpt-4.1-mini:  $0.40 in / $0.10 cached / $1.60 out
  gpt-4.1-nano:  $0.10 in / $0.025 cached / $0.40 out
(all launched 2025-04-14 at current pricing, no known changes since)

Batch rates follow OpenAI's standard 50% batch discount, consistent
with every other OpenAI entry already in this catalog.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@VasiliyRad VasiliyRad changed the title Add pricing for openai/gpt-4o-mini Add pricing for missing legacy/current OpenAI models (gpt-4o-mini, gpt-4o, gpt-4.1 family) Jul 22, 2026
@VasiliyRad
VasiliyRad merged commit 1074591 into PioneerSquareLabs:main Jul 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant