Skip to content

feat(pricing): add MiniMax M2.7 cost map entry - #33084

Closed
Adityai1411 wants to merge 1 commit into
BerriAI:litellm_oss_daily_2026_07_10from
Adityai1411:codex/add-minimax-m27
Closed

Adityai1411 wants to merge 1 commit into
BerriAI:litellm_oss_daily_2026_07_10from
Adityai1411:codex/add-minimax-m27

Conversation

@Adityai1411

@Adityai1411 Adityai1411 commented Jul 13, 2026 •

Copy link
Copy Markdown

Relevant issues

Closes #33058

Linear ticket

Pre-Submission checklist

  • I have added meaningful tests
  • My PR passes the relevant local checks for this isolated pricing-map change
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review

Screenshots / Proof of Fix

This adds a static model-cost-map entry. The values are sourced from MiniMax official docs:

Local verification:

python -m pytest tests/test_litellm/litellm_core_utils/test_get_model_cost_map.py -q
# 9 passed

python -m black --check tests/test_litellm/litellm_core_utils/test_get_model_cost_map.py
# 1 file would be left unchanged

Type

? Test

Changes

  • Added native minimax/MiniMax-M2.7 to model_prices_and_context_window.json.
  • Added the matching backup entry in litellm/model_prices_and_context_window_backup.json.
  • Added a regression test covering the native entry in both shipped maps, including pricing, context/output windows, prompt caching, tool support, reasoning support, and the absence of supports_vision.

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a minimax/MiniMax-M2.7 cost-map entry to both the root and backup JSON files, sourced from official MiniMax documentation. The entry shape and omission of cache_creation_input_token_cost are consistent with the newer MiniMax-M3 model already in the map.

  • Pricing values (3e-07 input, 1.2e-06 output, 6e-08 cache-read) match the cited pay-as-you-go docs; the 6e-08 cache-read price and absence of cache_creation_input_token_cost align with the MiniMax-M3 pattern.
  • max_output_tokens: 196608 (= context window 204800 − 8192) and max_input_tokens: 204800 are plausible; both JSON files are kept in sync.
  • The regression test reads only local filesystem files and makes no network calls, satisfying the mock-only test constraint.

Confidence Score: 5/5

Purely additive JSON and test changes with no modifications to existing entries or production code paths.

The change is a small, well-sourced addition to the model cost map with both JSON files kept in sync and a focused regression test. All field values are consistent with existing MiniMax models in the map and with the official docs cited in the PR description. No production logic is altered.

No files require special attention.

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds minimax/MiniMax-M2.7 cost-map entry with correct pricing ($0.3/M input, $1.2/M output, $0.06/M cache-read), 204800-token context window, and 196608 max output tokens; consistent with newer MiniMax models (M3 also lacks cache_creation_input_token_cost and uses the same cache-read price).
litellm/model_prices_and_context_window_backup.json Identical minimax/MiniMax-M2.7 entry added, kept in sync with the root JSON file.
tests/test_litellm/litellm_core_utils/test_get_model_cost_map.py New regression test verifies the M2.7 entry exists with correct values in both shipped maps; reads local filesystem files only (no network calls), so compliant with the mock-only test rule.

Reviews (1): Last reviewed commit: "feat(pricing): add MiniMax M2.7 cost map..." | Re-trigger Greptile

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Adityai1411

Copy link
Copy Markdown
Author

Thanks for checking. I looked into the failing checks: the auth-and-jwt failure appears to be in existing Bedrock wildcard auth tests, and osv-scan is flagging an existing uv.lock Pillow vulnerability. This PR only changes the MiniMax cost-map entries plus a focused local cost-map test, so I believe both failures are unrelated to this change.

@CLAassistant

CLAassistant commented Jul 13, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Superseded by rolling registry audit #37902, which reverified and absorbed the provider-documented metadata changes at field level

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.

2 participants