Add pricing for missing legacy/current OpenAI models (gpt-4o-mini, gpt-4o, gpt-4.1 family) - #4
Merged
VasiliyRad merged 2 commits intoJul 22, 2026
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-apichannel,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:
gpt-4o-minigpt-4oeffective_fromset 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 themgpt-4.1gpt-4.1-minigpt-4.1-nanoinput_includes_cache_read: trueis set on all of them, perdocs/prices.md's documented convention for OpenAI entries — OpenAI's usage reporting includes cached tokens insideprompt_tokens, so cached tokens must be deducted from billable input rather than charged twice.Test plan
test_gpt_4o_mini_is_priced(verifies the cache-read deduction math) and a parametrizedtest_legacy_openai_models_are_pricedcovering all four additional models.🤖 Generated with Claude Code