feat(models): add GPT-5.6 (sol/terra/luna) pricing and metadata - #32659
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Greptile SummaryThis PR adds day-0 pricing and capability metadata for the GPT-5.6 model family (
Confidence Score: 5/5Safe to merge — changes are purely additive JSON data and matching tests with no production logic modifications. The change is entirely confined to JSON cost-map entries and new/extended tests. All pricing multipliers are mathematically consistent, both cost-map files stay in sync, and no production code paths are modified. No files require special attention.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds four new GPT-5.6 model entries with complete pricing tiers; values are numerically consistent with the stated pricing rules (cache-write = 1.25x input, long-context input = 2x, long-context output = 1.5x) |
| litellm/model_prices_and_context_window_backup.json | Mirror of main cost map; sync verified by the new test_gpt_5_6_backup_matches_main test |
| tests/test_litellm/test_gpt_5_6_model_metadata.py | New test file verifying pricing, capability flags, endpoints, modalities, and provider routing for all four GPT-5.6 names; no network calls, reads local JSON files |
| tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py | Adds parametrized cost-calculation tests for gpt-5.6 family; uses LITELLM_LOCAL_MODEL_COST_MAP so no network calls are made |
| tests/test_litellm/llms/openai/test_is_model_gpt_5_model.py | Extends GPT5_MODELS list with gpt-5.6 variants and adds a new TestOpenAIGPT5ConfigIsModelGpt54PlusModel class to exercise the version-gating logic; all pure unit tests |
| tests/test_litellm/test_utils.py | Schema validator extended to accept the three new cache_creation cost keys; additive change that does not weaken existing validation |
Reviews (2): Last reviewed commit: "fix: floating point entry errors" | Re-trigger Greptile
|
Can you please also add the Azure entries? |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@emerzon thanks for the reminder. We're adding this in a follow-up |
…iAI#32659) * feat(models): add GPT-5.6 (sol/terra/luna) pricing and metadata Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test: allow gpt-5.6 service-tier cache-write keys in model prices schema Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix: floating point entry errors --------- Co-authored-by: mateo <mateo@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
Relevant issues
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaito re-request a review after pushing changes)Screenshots / Proof of Fix
Captured at commit
1f6e8640ceA live completion against the real OpenAI API wasn't possible at capture time: GPT-5.6 is rolling out globally over roughly 24 hours, so
GET https://api.openai.com/v1/models/gpt-5.6(and-sol) still return 404 for this account even with a valid key, and a chat request 404s upstream. The end-user-visible behavior this PR actually changes is the pricing and capability metadata the gateway resolves and serves, so the proof is a real litellm proxy onlocalhost:4000booted with the updated cost map, queried over HTTP with no mocks. A live completion was re-run once the account gained 5.6 access; see the update at the end of this sectionBoot:
curl -s http://localhost:4000/model/info(summarized) returns the new entries with the pricing and metadata from this PR:The cache-write rate is 1.25x the uncached input rate for every tier, the long-context (>272K) rate is 2x input and 1.5x output, and the alias
gpt-5.6matchesgpt-5.6-sol, all as intendedUpdate, captured at commit
594c61bc86: the account now has GPT-5.6 access, so here is the fully live end-to-end proof, hitting the real OpenAI API through the proxy with no mocks and costing real $. Same boot command as above; one completion per model, printing the message content, token usage, and the proxy'sx-litellm-response-costheader:Output:
Every cost matches this PR's rates exactly: luna is 20 x 1e-06 + 13 x 6e-06 = 9.8e-05, terra is 20 x 2.5e-06 + 13 x 1.5e-05 = 0.000245, sol is 19 x 5e-06 + 12 x 3e-05 = 0.000455, and the bare
gpt-5.6alias prices at the sol rates as intended (18 x 5e-06 + 11 x 3e-05 = 0.00042)Type
🆕 New Feature
Changes
Day 0 support for OpenAI's GPT-5.6 family in the model cost map. Adds
gpt-5.6,gpt-5.6-sol,gpt-5.6-terra, andgpt-5.6-lunato bothmodel_prices_and_context_window.jsonand the bundledlitellm/model_prices_and_context_window_backup.json, so cost tracking, context-window enforcement, and capability flags work with no code changes. The baregpt-5.6alias mirrors the flagshipgpt-5.6-soltierNo transformation code was needed.
OpenAIGPT5Config.is_model_gpt_5_modelalready routes anything matchinggpt-5.*through the GPT-5 reasoning path, andis_model_gpt_5_4_plus_modelparses the version numerically so 5.6 lands on the 5.4-or-newer side that auto-switches to the/v1/responsesbridge when tools are combined withreasoning_effortPricing follows OpenAI's published rates (per 1M tokens, standard tier):
Each entry carries the full tier matrix the cost calculator understands: the standard, Flex, Batch, and Priority service tiers, plus the above-272K-token long-context variants for input, output, and cache read. Cache writes are new for this family and are billed at 1.25x the uncached input rate, encoded as
cache_creation_input_token_cost(with_above_272k_tokens,_flex, and_priorityvariants). The family shares a 1,050,000-token input window, 128,000-token max output, reasoning support, web search, vision, structured outputs, and the 10% regional-processing uplift that applies to models released on or after March 5, 2026Reasoning-effort flags mirror GPT-5.5 (OpenAI's guide states GPT-5.5 prompting guidance carries over to GPT-5.6):
noneandxhighsupported,minimalnot supported. The newermaxreasoning effort andproreasoning mode surfaced in the GPT-5.6 guide are follow-ups; they need transformation work and are out of scope hereCommit
594c61bc86cleans three floating point representation artifacts in the luna cache-read rates flagged by Greptile, so the raw JSON now carries the intended2e-07and5e-08instead of values like2.0000000000000002e-07Scope is OpenAI only.
azure_ai/gpt-5.6variants can follow once Azure exposes the modelsTests
tests/test_litellm/test_gpt_5_6_model_metadata.pypins pricing, capability flags, endpoints, modalities, and provider routing for all four names, and asserts the main and backup maps stay in synctest_generic_cost_per_token_gpt56intest_llm_cost_calc_utils.pychecks standard, long-context, and cache-write pricing flow throughgeneric_cost_per_tokenis_model_gpt_5_modelregression list and a newis_model_gpt_5_4_plus_modelclass both cover the gpt-5.6 familyLink to Devin session: https://app.devin.ai/sessions/93a883e6bc334fd4892564f4a2b14797
Requested by: @mateo-berri