Skip to content

feat: add GPT-6 Luna to model pricing - #516

Merged
neuromechanist merged 1 commit into
OpenScience-Collective:developfrom
bendichter:feature/issue-514-luna-pricing
Sep 25, 2026
Merged

neuromechanist merged 1 commit into
OpenScience-Collective:developfrom
bendichter:feature/issue-514-luna-pricing

Conversation

@bendichter

Copy link
Copy Markdown
Contributor

Refs #514 (section 3).

Summary

Adds openai/gpt-6-luna to MODEL_PRICING at $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 for openai.gpt-6-luna.

Without a pricing entry, _check_model_cost rejects the model on community keys. A community that funds itself through OpenRouter (openrouter_api_key_env_var) and sets default_model: openai/gpt-6-luna currently gets:

403: Model 'openai/gpt-6-luna' is not in the approved pricing list and cannot be used with platform or community keys.

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 check and ruff format --check are clean.
  • End to end against a local server with a community config (default_model: openai/gpt-6-luna, openrouter_api_key_env_var set, a request from an allowed origin with no BYOK header): /<community>/ask now returns 200. request_log shows model=openai/gpt-6-luna, key_source=community. Before this change, the same request returned the 403 above.

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-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@neuromechanist
neuromechanist merged commit 973dc2f into OpenScience-Collective:develop Sep 25, 2026
7 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.

3 participants