Skip to content

feat(pricing): add minimax/MiniMax-M2.7 to cost map - #33063

Closed
devin-ai-integration[bot] wants to merge 1 commit into
litellm_internal_stagingfrom
litellm_add_minimax_m2_7
Closed

devin-ai-integration[bot] wants to merge 1 commit into
litellm_internal_stagingfrom
litellm_add_minimax_m2_7

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Relevant issues

Fixes #33058

Linear ticket

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • 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 (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Screenshots / Proof of Fix

The model now resolves via the local cost map (captured at commit 07f3691):

$ LITELLM_LOCAL_MODEL_COST_MAP=True uv run --no-sync python -c "
import litellm
info = litellm.get_model_info('minimax/MiniMax-M2.7')
print('provider:', info['litellm_provider'])
print('input:', info['input_cost_per_token'], 'output:', info['output_cost_per_token'], 'cache_read:', info.get('cache_read_input_token_cost'))
print('max_input:', info['max_input_tokens'], 'max_output:', info['max_output_tokens'])
print('reasoning:', info.get('supports_reasoning'), 'fc:', info.get('supports_function_calling'))
"
provider: minimax
input: 3e-07 output: 1.2e-06 cache_read: 6e-08
max_input: 204800 max_output: 196608
reasoning: True fc: True

Type

🆕 New Feature

Changes

Adds a native minimax/MiniMax-M2.7 entry to model_prices_and_context_window.json and its litellm/model_prices_and_context_window_backup.json mirror. Previously the model only existed under non-native prefixes (sambanova/, fireworks_ai/, pinstripes/), so callers using the native MiniMax provider got no cost tracking or context-window metadata

Pricing comes from the official MiniMax platform pricing page (input $0.30 / 1M, output $1.20 / 1M); the cached-input rate ($0.06 / 1M) mirrors the sibling minimax/MiniMax-M3 entry. Flags follow minimax/MiniMax-M3 minus supports_vision since M2.7 is text-only. Context window is 204,800 tokens per the published model details

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

Link to Devin session: https://app.devin.ai/sessions/070b486ca2ba4772a8a3dbceceb60a12

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a native minimax/MiniMax-M2.7 entry to both the primary and backup cost-map JSON files, enabling cost tracking and context-window metadata for callers using the native MiniMax provider.

  • Pricing fields (input_cost_per_token: 3e-7, output_cost_per_token: 1.2e-6, cache_read_input_token_cost: 6e-8) match the published MiniMax platform rates and are consistent with the sibling minimax/MiniMax-M3 entry.
  • Capability flags mirror minimax/MiniMax-M3 with supports_vision correctly omitted since M2.7 is text-only; tiered above_512k pricing fields are also omitted as M2.7's max context (204,800 tokens) is well below that threshold.
  • Both model_prices_and_context_window.json and the litellm/model_prices_and_context_window_backup.json mirror are updated identically.

Confidence Score: 5/5

Safe to merge — both JSON files receive identical, well-formed entries with no logic changes anywhere in the codebase.

The change is purely additive: two JSON files each receive one new cost-map entry. The pricing arithmetic is correct, the capability flags align with the sibling model entry, the tiered pricing fields are intentionally absent because the model's context window falls well below the 512k tier, and both files are kept in sync. There are no code paths, migrations, or tests touched.

No files require special attention.

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds minimax/MiniMax-M2.7 entry with correct pricing ($0.30/$1.20/$0.06 per 1M tokens), context window (204800/196608), and capability flags consistent with the sibling MiniMax-M3 entry minus vision support.
litellm/model_prices_and_context_window_backup.json Mirror backup file updated identically to match the primary JSON — both files are consistent.

Reviews (1): Last reviewed commit: "feat(pricing): add minimax/MiniMax-M2.7 ..." | 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!

@codspeed

codspeed Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_add_minimax_m2_7 (07f3691) with litellm_internal_staging (c2141b1)

Open in CodSpeed

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

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.

Add "minimax/MiniMax-M2.7" in "model_prices_and_context_window.json"

1 participant