Repository navigation
feat(openai): add GPT-6 Sol and GPT-6 Luna - #42515
Conversation
Add gpt-6-sol and gpt-6-luna to the model cost map with pricing from the OpenAI pricing page and reasoning effort levels none through max. Extend the long-context priority pricing and reasoning effort capability tests to cover both models Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
bugbot run |
|
| "gpt-6-sol": { | ||
| "input_cost_per_token_above_272k_tokens_priority": 8e-06, | ||
| "output_cost_per_token_above_272k_tokens_priority": 3e-05, | ||
| "cache_read_input_token_cost_above_272k_tokens_priority": 8e-07, | ||
| "cache_creation_input_token_cost_above_272k_tokens_priority": 1e-05, | ||
| }, | ||
| "gpt-6-luna": { | ||
| "input_cost_per_token_above_272k_tokens_priority": 4e-07, | ||
| "output_cost_per_token_above_272k_tokens_priority": 1.5e-06, | ||
| "cache_read_input_token_cost_above_272k_tokens_priority": 4e-08, | ||
| "cache_creation_input_token_cost_above_272k_tokens_priority": 5e-07, | ||
| }, |
There was a problem hiding this comment.
The new GPT-6 Sol and Luna rates are only added to module-level dictionaries and lists. This file has no test function or assertion that consumes them, so CI can pass even if production selects a missing or incorrect priority long-context rate. Please add an executable test that calculates the cost for each model and asserts the result.
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit dc6273e. Configure here.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…AI#43935) Backport of BerriAI#43935 to stable/1.103.x. Cherry-picked from d7620c7 (main). Ported from the stable/1.104.x adaptation (54f9259): the bridge check lives in litellm/main.py and the effort helpers keep the line's private names. Cost-map edits replay only this PR's reasoning-effort flags (gpt-6-astra and gpt-5.3-codex rows), plus supports_none_reasoning_effort=false on the azure gpt-6.1-sol rows from BerriAI#46377, which the fix's tests key on. Tests built on gpt-6-sol rows (BerriAI#42515), the Foundry tools-to-Responses bridge, or a full azure/eu/gpt-6-astra row are dropped since none of those are on this line.
…erriAI#47419) Backport of BerriAI#47419 to stable/1.103.x. Cherry-picked from 3124797 (main), via the stable/1.104.x port c88cf13cd3. Adapted to the line: the cost-calc threshold changes are applied to this line's loop without the 1.104 base's batch-tier helpers; ModelNotMappedError from BerriAI#42497 is hand-ported (exception class plus the get_model_info raise and re-raise) so registration lookups can tell an unmapped model from a transient failure; tests whose catalog rows (gpt-6-sol, gpt-6-luna from BerriAI#42515) are not on this line are retargeted to amazon.nova-micro-v1:0 and gpt-5.6-sol profiles; the test conftest also snapshots _runtime_registered_fields. Billing checked unchanged on this line for a cross-provider alias (keeps cache prices) and for unpriced openai/ft: and bedrock/ap-northeast-1 deployments.
TLDR
Problem this solves:
/v1/modelslistsgpt-6-solandgpt-6-luna, the cost map does notHow it solves it:
gpt-6-solandgpt-6-lunaentries next togpt-6-astraUser Flow
Before: a developer calling the new models through the gateway sees them work but get logged at $0
"model": "gpt-6-sol"/model_group/infolists no supported reasoning efforts for itAfter: the same request is priced and described
"model": "gpt-6-sol"x-litellm-response-costheader/model_group/infolists none, low, medium, high, xhigh and maxRelevant issues
Model request from Slack (#litellm-provider-info-sync)
Affected release
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
Pricing evidence, parsed from the raw HTML of https://developers.openai.com/api/docs/pricing on 2026-09-22 (per 1M tokens, Input / Cached input / Cache writes / Output, then the same four above 272k):
Batch is 50% of standard, same as the existing
gpt-6-astrarow. The model pages (https://developers.openai.com/api/docs/models/gpt-6-sol and /gpt-6-luna) give 1,050,000 context window, 128,000 max output, text and image input, andreasoning.effort supports none, low, medium (default), high, xhigh, and max.curl https://api.openai.com/v1/modelslists both idsThe requester asked to skip the live smoke test for speed, so there is no before/after proxy run here
Type
🆕 New Feature
Caveats (if any)
Low
Final Attestation
Link to Devin session: https://app.devin.ai/sessions/cbced8a2842b46449a1ce5c4f049492c
Open in Devin Desktop: https://app.devin.ai/desktop/session/cbced8a2842b46449a1ce5c4f049492c?variant=devin
Note
Low Risk
Catalog-only additions with regression tests; fixes under-billing and metadata gaps without changing request routing or auth.
Overview
Adds OpenAI
gpt-6-solandgpt-6-lunato the LiteLLM model cost map (model_prices_and_context_window.jsonand its backup), so gateway requests to these models get non-zero cost tracking and correct capability metadata instead of $0 spend and missing reasoning levels.Each entry mirrors the existing GPT-6-style shape: standard / flex / priority / batch token rates (including above-272k and cache read/write variants), 922k input / 128k output limits, chat mode, and feature flags (tools, vision, PDF, prompt caching, web search, reasoning, etc.).
gpt-6-lunais priced lower thangpt-6-solon the same tier structure.Tests lock in reasoning effort
nonethroughmaxfor both models (unlikegpt-6-astra, which omitsnone) and extend priority long-context pricing cases for the new ids.Reviewed by Cursor Bugbot for commit dc6273e. Bugbot is set up for automated code reviews on this repo. Configure here.