Skip to content

feat(sdk): upgrade MiniMax default model list to M3#4519

Open
octo-patch wants to merge 1 commit into
Agenta-AI:mainfrom
octo-patch:feature/upgrade-minimax-m3
Open

feat(sdk): upgrade MiniMax default model list to M3#4519
octo-patch wants to merge 1 commit into
Agenta-AI:mainfrom
octo-patch:feature/upgrade-minimax-m3

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

Upgrade the minimax provider entry in supported_llm_models to surface the latest MiniMax flagship model (MiniMax-M3) and prune the deprecated older series.

Changes

sdks/python/agenta/sdk/utils/assets.py:

  • Add minimax/MiniMax-M3.
  • Remove the deprecated MiniMax-M2.5, MiniMax-M2.5-lightning, MiniMax-M2.1, MiniMax-M2.1-lightning, and MiniMax-M2 entries.

No other files needed changes — every other minimax reference in the repo (env vars, provider enums, helm templates, icons, transforms, etc.) is at the provider level and does not enumerate specific model IDs.

Why

MiniMax-M3 is the new flagship from MiniMax (release notes): 512K context window, 128K max output, image input, accessible over both OpenAI-compatible and Anthropic-compatible interfaces. The older M2.x line is being deprecated by the upstream provider.

Note on the litellm model-registry test

test_supported_llm_models.py asserts every model in supported_llm_models exists in litellm.model_cost. The latest litellm release (1.86.2) and main do not yet include minimax/MiniMax-M3 (only the M2.x entries), so that single parametrized case will fail until litellm registers M3 (cf. the precedent for M2: BerriAI/litellm#15950). The model still routes correctly through the minimax/ prefix at runtime; only the cost-metadata lookup is missing.

Happy to follow up by filing the litellm-registry PR, or to gate this PR on the litellm release if you prefer.

Test plan

  • ruff format and ruff check clean on the changed file
  • supported_llm_models["minimax"] now resolves to ["minimax/MiniMax-M3"]
  • Smoke-test M3 against https://api.minimax.io/v1 via the LiteLLM minimax/ route once registered

Replace deprecated MiniMax-M2.5/M2.1/M2 (and their lightning variants)
with MiniMax-M3, the latest flagship model from MiniMax with 512K
context window and 128K max output.

Signed-off-by: octo-patch <noreply@octo-patch.dev>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

Someone is attempting to deploy a commit to the agenta projects Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 2, 2026
@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.


octo-patch seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dosubot dosubot Bot added enhancement New feature or request SDK labels Jun 2, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 2, 2026

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added support for MiniMax-M3 model
  • Updates

    • Removed support for legacy MiniMax model variants

Walkthrough

This PR updates the supported model list for the MiniMax provider in the assets configuration file. The change replaces previously supported MiniMax model variants with the new minimax/MiniMax-M3 model, ensuring the SDK reflects the current available model for that provider.

Changes

MiniMax Model Registry Update

Layer / File(s) Summary
Update MiniMax model registry
sdks/python/agenta/sdk/utils/assets.py
The minimax provider entry in supported_llm_models is updated to remove previous MiniMax model variants (e.g., MiniMax-M2.x) and add the new minimax/MiniMax-M3 model.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • Agenta-AI/agenta#4349: Both PRs modify sdks/python/agenta/sdk/utils/assets.py's supported_llm_models registry, with overlapping edits to the model configuration layer.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: upgrading the MiniMax model list to M3, which aligns with the core objective of updating supported_llm_models.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, clearly explaining the motivation, changes made, testing status, and known limitations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 69dda324-f5aa-41b3-9d89-3c71433893f6

📥 Commits

Reviewing files that changed from the base of the PR and between d7c60c1 and 523e174.

📒 Files selected for processing (1)
  • sdks/python/agenta/sdk/utils/assets.py

Comment on lines 186 to 188
"minimax": [
"minimax/MiniMax-M2.5",
"minimax/MiniMax-M2.5-lightning",
"minimax/MiniMax-M2.1",
"minimax/MiniMax-M2.1-lightning",
"minimax/MiniMax-M2",
"minimax/MiniMax-M3",
],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if MiniMax-M3 is already registered in the installed litellm version

python3 << 'PYEOF'
try:
    from litellm import model_cost as LITELLM_MODEL_COST
    
    model = "minimax/MiniMax-M3"
    print(f"Checking litellm registration for: {model}")
    
    # Direct lookup
    if model in LITELLM_MODEL_COST:
        print(f"✓ Found in litellm.model_cost: {LITELLM_MODEL_COST[model]}")
    else:
        print(f"✗ NOT found in litellm.model_cost (direct lookup)")
        
        # Fallback: check without prefix
        if "/" in model:
            without_prefix = model.split("/", 1)[1]
            if without_prefix in LITELLM_MODEL_COST:
                print(f"✓ Found without prefix: {without_prefix} -> {LITELLM_MODEL_COST[without_prefix]}")
            else:
                print(f"✗ NOT found in litellm.model_cost (without prefix: {without_prefix})")
                
    # List all minimax entries
    print("\nAll 'minimax' entries in litellm.model_cost:")
    minimax_entries = {k: v for k, v in LITELLM_MODEL_COST.items() if 'minimax' in k.lower()}
    if minimax_entries:
        for k in sorted(minimax_entries.keys()):
            print(f"  - {k}")
    else:
        print("  (none found)")
        
except ImportError:
    print("✗ litellm not available")
PYEOF

Repository: Agenta-AI/agenta

Length of output: 84


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the relevant portion of assets.py around the referenced lines
sed -n '150,230p' sdks/python/agenta/sdk/utils/assets.py | nl -ba

# Find and show the referenced test file (and relevant assertions) if present
TEST_FILE="$(fd -t f -a 'test_supported_llm_models.py' sdks/python . || true)"
echo "TEST_FILE=$TEST_FILE"

if [ -n "${TEST_FILE:-}" ]; then
  # Print a focused window around likely model/cost assertions
  # (limit output; adjust if file is small/large)
  wc -l "$TEST_FILE"
  sed -n '1,220p' "$TEST_FILE" | nl -ba
fi

# Also locate _get_model_costs definition (to verify its behavior)
fd -t f -a '_get_model_costs' sdks/python . | head -n 20

Repository: Agenta-AI/agenta

Length of output: 103


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show assets.py context around the referenced lines
echo "== assets.py (context around 170-220) =="
sed -n '170,220p' sdks/python/agenta/sdk/utils/assets.py

# Show further context around where _get_model_costs likely lives
echo
echo "== assets.py (context around 220-320) =="
sed -n '220,320p' sdks/python/agenta/sdk/utils/assets.py

# Locate test file
echo
echo "== locating test_supported_llm_models.py =="
TEST_FILE="$(fd -t f -a 'test_supported_llm_models.py' . | head -n 20 || true)"
echo "TEST_FILE:"
echo "${TEST_FILE:-<not found>}"

if [ -n "${TEST_FILE:-}" ] && [ "${TEST_FILE:-}" != "<not found>" ]; then
  echo
  echo "== test file (first 260 lines) =="
  sed -n '1,260p' "$TEST_FILE"
fi

# Search for usage of _get_model_costs and minimax metadata expectations
echo
echo "== searching for _get_model_costs usage =="
rg -n "_get_model_costs" sdks/python/agenta/sdk/utils/assets.py sdks/python/agenta | head -n 50

echo
echo "== searching for minimax/MiniMax-M3 and/or minimax metadata in tests =="
rg -n "minimax/MiniMax-M3|minimax\"|minimax.*M3|model_metadata\\[\"minimax\"\\]" . | head -n 100

Repository: Agenta-AI/agenta

Length of output: 50375


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== assets.py imports around cost_calculator =="
sed -n '1,120p' sdks/python/agenta/sdk/utils/assets.py

echo
echo "== find tests referencing model_metadata or _get_model_costs =="
rg -n "model_metadata|_get_model_costs|cost_per_token|cost_calculator" sdks/python/oss/tests | head -n 200

echo
echo "== find tests referencing minimax/MiniMax-M3 or 'minimax' metadata =="
rg -n "minimax/MiniMax-M3|minimax\"|MiniMax-M3" sdks/python/oss/tests | head -n 200

echo
echo "== confirm supported_llm_models definition is imported in tests =="
rg -n "supported_llm_models" sdks/python/oss/tests/pytest/unit | head -n 200

Repository: Agenta-AI/agenta

Length of output: 4860


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== searching for model_metadata usage =="
rg -n "model_metadata" sdks/python/oss/tests | head -n 200

echo
echo "== searching for minimax/MiniMax-M3 usage in tests =="
rg -n "minimax/MiniMax-M3" . | head -n 200

echo
echo "== searching for supported_llm_models usage in tests =="
rg -n "supported_llm_models" sdks/python/oss/tests | head -n 200

Repository: Agenta-AI/agenta

Length of output: 101


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== searching for litellm.model_cost usage in tests =="
rg -n "litellm\.model_cost|model_cost" sdks/python/oss/tests | head -n 200

echo
echo "== searching for cost_calculator / cost_per_token usage in tests =="
rg -n "cost_calculator|cost_per_token|completion_cost" sdks/python/oss/tests | head -n 200

echo
echo "== locating assertions about minimax / model_metadata in tests =="
rg -n "model_metadata|minimax" sdks/python/oss/tests | head -n 200

Repository: Agenta-AI/agenta

Length of output: 1429


Fix test-dependency reasoning for MiniMax-M3 (litellm.model_cost vs cost metadata)

"minimax": [
    "minimax/MiniMax-M3",
],

sdks/python/oss/tests/pytest/unit/test_supported_llm_models.py fails based on model existence: it asserts every entry in supported_llm_models is present in litellm.model_cost (either directly, or after stripping the provider prefix). So minimax/MiniMax-M3 must land in litellm.model_cost for this PR’s test to pass.

The _get_model_costs() / model_metadata population via litellm.cost_calculator.cost_per_token(...) is a separate concern (it may omit minimax costs until litellm’s cost data exists), and I didn’t find a test here that directly asserts on model_metadata.

Merge sequencing suggestion remains: merge the litellm registry PR first → wait for a litellm release that includes M3 in model_cost → then merge this PR.


⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for any remaining references to removed MiniMax M2.x models

echo "=== Searching for MiniMax M2 model references ==="
rg -n --type=py --type=yaml --type=json --type=md -i 'minimax.*m2\.' -C2

echo ""
echo "=== Searching for any minimax model strings (broader search) ==="
rg -n --type=py --type=yaml --type=json -i 'minimax.*m2[.-]' -C2

Repository: Agenta-AI/agenta

Length of output: 176


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Inspect assets.py around minimax entry ==="
nl -ba sdks/python/agenta/sdk/utils/assets.py | sed -n '150,230p'

echo
echo "=== Search for removed MiniMax M2.x model strings across entire repo (all file types) ==="
rg -n -i "MiniMax-M2(\.5|-\.5|-)?|MiniMax-M2\.1|MiniMax-M2\.5|MiniMax-M2\.1-lightning|MiniMax-M2\.5-lightning|MiniMax-M2\b" . || true

echo
echo "=== Search for 'minimax/MiniMax-M3' usage across repo ==="
rg -n -i "minimax/MiniMax-M3" . || true

echo
echo "=== Locate and inspect test_supported_llm_models.py ==="
TEST_FILE="$(fd -a -i "test_supported_llm_models\.py" . || true)"
echo "Found: ${TEST_FILE:-<none>}"
if [ -n "${TEST_FILE:-}" ]; then
  nl -ba "$TEST_FILE" | sed -n '1,220p'
fi

echo
echo "=== Search for litellm.model_cost usage ==="
rg -n "litellm\.model_cost|_get_model_costs|supported_llm_models|model_cost" sdks/python/agenta . || true

Repository: Agenta-AI/agenta

Length of output: 168


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Inspect assets.py around minimax entry ==="
awk '{printf "%d\t%s\n", NR, $0}' sdks/python/agenta/sdk/utils/assets.py | sed -n '150,240p'

echo
echo "=== Search for removed MiniMax M2.x model strings across entire repo (all file types) ==="
rg -n -i "MiniMax-M2(\.5|-\.5|-)?|MiniMax-M2\.1|MiniMax-M2\.5|MiniMax-M2\.1-lightning|MiniMax-M2\.5-lightning|MiniMax-M2\b" . || true

echo
echo "=== Search for 'minimax/MiniMax-M3' usage across repo ==="
rg -n -i "minimax/MiniMax-M3" . || true

echo
echo "=== Locate and inspect test_supported_llm_models.py ==="
TEST_FILE="$(find . -name 'test_supported_llm_models.py' -print -quit || true)"
echo "Found: ${TEST_FILE:-<none>}"
if [ -n "${TEST_FILE:-}" ]; then
  awk '{printf "%d\t%s\n", NR, $0}' "$TEST_FILE" | sed -n '1,260p'
fi

echo
echo "=== Search for litellm.model_cost / supported_llm_models / model_cost ==="
rg -n "litellm\.model_cost|_get_model_costs|supported_llm_models|model_cost" sdks/python/agenta . || true

Repository: Agenta-AI/agenta

Length of output: 18370


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "=== Inspect assets.py around model_metadata initialization ==="
awk '{printf "%d\t%s\n", NR, $0}' sdks/python/agenta/sdk/utils/assets.py | sed -n '230,330p'

Repository: Agenta-AI/agenta

Length of output: 729


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "=== Inspect top of assets.py for cost_calculator import/definition ==="
awk '{printf "%d\t%s\n", NR, $0}' sdks/python/agenta/sdk/utils/assets.py | sed -n '1,120p'

echo
echo "=== Inspect _get_model_costs body to see missing-model behavior ==="
awk '{printf "%d\t%s\n", NR, $0}' sdks/python/agenta/sdk/utils/assets.py | sed -n '180,255p'

Repository: Agenta-AI/agenta

Length of output: 6853


Major breaking change: MiniMax M2.x models removed—add migration/deprecation and ensure litellm supports M3

sdks/python/agenta/sdk/utils/assets.py now lists only minimax/MiniMax-M3 under the minimax provider (removing the MiniMax-M2* variants). This can break existing user configs/workflows that still reference any MiniMax-M2* model strings.

  • Repo impact: no remaining MiniMax-M2* references were found in the codebase, but external user configuration/docs may still contain them.
  • LiteLLM/costs sequencing: model_metadata is populated only when litellm.cost_calculator.cost_per_token() returns non-zero costs; otherwise minimax metadata for minimax/MiniMax-M3 will be absent. Additionally, sdks/python/oss/tests/pytest/unit/test_supported_llm_models.py asserts every supported_llm_models entry exists in litellm.model_cost, so CI will fail until minimax/MiniMax-M3 is registered in LiteLLM.

Request: provide a deprecation/migration plan (or clearly documented release notes + migration guide) and ensure the LiteLLM registration timing aligns with the removal (or gate/adjust tests/metadata until it does).

Copy link
Copy Markdown
Member

@mmabrouk mmabrouk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @octo-patch for the PR

I am not sure MiniMax-M2.5 is deprecated, I still can see it in the page (https://platform.minimax.io/docs/guides/text-generation)

As a rule we should include all the models that are available/usable. This means including also 2.7.

Your comment mentions this will not work until litellm adds it. Is that correct? Or is it so that it will work but won't have any cost?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request SDK size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants