Repository navigation
feat: add GPT-6 Luna to model pricing - #516
Merged
neuromechanist merged 1 commit intoSep 25, 2026
Merged
neuromechanist merged 1 commit into
neuromechanist merged 1 commit into
Conversation
Communities funding themselves through OpenRouter can now use openai/gpt-6-luna as their default model. Previously the cost guard rejected it with 403 because it was missing from MODEL_PRICING. Refs OpenScience-Collective#514
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
neuromechanist
merged commit Sep 25, 2026
973dc2f
into
OpenScience-Collective:develop
7 checks passed
6 tasks
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.
Refs #514 (section 3).
Summary
Adds
openai/gpt-6-lunatoMODEL_PRICINGat $0.10 / $0.50 per million input / output tokens. I checked that rate against OpenRouter's model catalog; it's the same as Bedrock's global rate foropenai.gpt-6-luna.Without a pricing entry,
_check_model_costrejects the model on community keys. A community that funds itself through OpenRouter (openrouter_api_key_env_var) and setsdefault_model: openai/gpt-6-lunacurrently gets:With this change, that community's requests are served by Luna on its own key. The change doesn't touch the Anthropic path,
OFFERED_MODELS, or the Bedrock work discussed in #514.Tests
test_gpt_6_luna_cost: the cost estimate uses the new rate.test_gpt_6_luna_allowed_on_community_key:_check_model_cost("openai/gpt-6-luna", "community")no longer raises.pytest tests/test_metrics/test_cost.py tests/test_api/test_cost_protection.py tests/test_core/test_litellm_llm.py: 78 passed, 8 skipped.ruff checkandruff format --checkare clean.default_model: openai/gpt-6-luna,openrouter_api_key_env_varset, a request from an allowed origin with no BYOK header):/<community>/asknow returns 200.request_logshowsmodel=openai/gpt-6-luna,key_source=community. Before this change, the same request returned the 403 above.