Skip to content

feat: add MiniMax models to the catalog - #180

Open
octo-patch wants to merge 3 commits into
asklokesh:mainfrom
octo-patch:octo/20260713-add-minimax-model-catalog-recvoLiZpkPvsc-v2
Open

feat: add MiniMax models to the catalog#180
octo-patch wants to merge 3 commits into
asklokesh:mainfrom
octo-patch:octo/20260713-add-minimax-model-catalog-recvoLiZpkPvsc-v2

Conversation

@octo-patch

Copy link
Copy Markdown
Contributor

Summary

  • Register MiniMax-M3 and MiniMax-M2.7 with complete context, capability, and pricing metadata.
  • Record global and China Base URLs for the OpenAI-compatible and Anthropic-compatible APIs.
  • Document both existing adapter paths and add focused regression coverage.
  • Keep tiered rates in catalog metadata instead of flattening them into the runtime budget table.

Verification

  • python3 -m json.tool providers/model_catalog.json
  • bash -n tests/test-minimax-model-catalog.sh
  • bash -n tests/run-all-tests.sh
  • bash tests/test-minimax-model-catalog.sh
  • bash tests/test-cli-provider-flag.sh
  • bash tests/test-model-and-port.sh
  • git diff --check

@octo-patch
octo-patch requested a review from asklokesh as a code owner July 13, 2026 09:07
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA. Thank you.
Posted by the CLA Assistant Lite bot.

@octo-patch octo-patch mentioned this pull request Jul 13, 2026
5 tasks
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added MiniMax model catalog support, including regional endpoints, model metadata, and pricing.
    • Added compatibility configurations for Anthropic- and OpenAI-compatible MiniMax integrations.
  • Documentation

    • Added setup instructions, required environment variables, regional URLs, and example commands for using MiniMax models.
    • Documented model overrides for alternate MiniMax versions.
  • Tests

    • Added automated validation for MiniMax catalog entries, endpoint settings, pricing, documentation, and adapter resolution.

Walkthrough

The catalog now defines MiniMax models, regional endpoints, metadata, and pricing. Documentation describes routing MiniMax through existing Claude and Aider adapters. New tests validate catalog consistency, documentation references, and adapter model resolution.

Changes

MiniMax compatibility

Layer / File(s) Summary
MiniMax catalog configuration
providers/model_catalog.json
Adds MiniMax defaults, regional endpoints, model metadata, context limits, and pricing.
Compatible adapter documentation
wiki/Providers.md
Documents Anthropic-compatible and OpenAI-compatible MiniMax setup, regional URLs, environment variables, commands, and model overrides.
Catalog and adapter validation
tests/run-all-tests.sh, tests/test-minimax-model-catalog.sh
Registers and runs checks for catalog values, documentation references, and Claude/Aider adapter model resolution.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: asklokesh

Poem

I’m a rabbit with models to map,
Regional endpoints tucked in my lap.
M3 and M2.7 hop into view,
Adapter paths pass each test,
Documentation grows—thump, thump, hooray!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding MiniMax models to the catalog.
Description check ✅ Passed The description directly summarizes the MiniMax catalog, documentation, endpoint, pricing, and test changes.
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.
✨ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
providers/model_catalog.json (1)

82-99: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider a notes field explaining the single-model tier strategy.

latest_development and latest_fast both resolve to MiniMax-M3 (tier "planning"), while MiniMax-M2.7 is tagged "tier": "development" but is never referenced by any latest_* field. The codex provider block above has the identical asymmetry (latest_development/latest_fastgpt-5.3-codex, tier "planning") and documents it with a "notes" field. Adding an equivalent note here would prevent future maintainers from assuming latest_development should point at the model tagged "development".

♻️ Suggested addition
     "minimax": {
       "latest_planning": "MiniMax-M3",
       "latest_development": "MiniMax-M3",
       "latest_fast": "MiniMax-M3",
+      "notes": "MiniMax-M3 is used for all tiers; MiniMax-M2.7 (tier: development) is catalog-only and not a latest_* default.",
       "endpoints": [
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@providers/model_catalog.json` around lines 82 - 99, Add a notes field to the
minimax provider configuration documenting that latest_development and
latest_fast intentionally resolve to MiniMax-M3 despite its planning tier, while
MiniMax-M2.7 is the development-tier model and is not selected by a latest_*
field. Match the equivalent documentation pattern used in the codex provider
block.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@providers/model_catalog.json`:
- Around line 100-163: Update the max_output values in the models array: set
MiniMax-M3 to 512000 and MiniMax-M2.7 to 128000. Leave all other model metadata
and pricing unchanged.

---

Nitpick comments:
In `@providers/model_catalog.json`:
- Around line 82-99: Add a notes field to the minimax provider configuration
documenting that latest_development and latest_fast intentionally resolve to
MiniMax-M3 despite its planning tier, while MiniMax-M2.7 is the development-tier
model and is not selected by a latest_* field. Match the equivalent
documentation pattern used in the codex provider block.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 213badce-927e-4973-bc0e-3c5913e3c839

📥 Commits

Reviewing files that changed from the base of the PR and between 3dc7cff and cd39d0a.

📒 Files selected for processing (4)
  • providers/model_catalog.json
  • tests/run-all-tests.sh
  • tests/test-minimax-model-catalog.sh
  • wiki/Providers.md

Comment on lines +100 to +163
"models": [
{
"id": "MiniMax-M3",
"tier": "planning",
"context_window": 1000000,
"max_output": 524288,
"input_modalities": ["text", "image", "video"],
"thinking": ["adaptive", "disabled"],
"pricing_usd_per_million_tokens": {
"input": 0.3,
"output": 1.2,
"cache_read": 0.06,
"cache_write": null
},
"pricing_tiers_usd_per_million_tokens": [
{
"service_tier": "standard",
"input_tokens_lte": 512000,
"input": 0.3,
"output": 1.2,
"cache_read": 0.06,
"cache_write": null
},
{
"service_tier": "standard",
"input_tokens_gt": 512000,
"input": 0.6,
"output": 2.4,
"cache_read": 0.12,
"cache_write": null
},
{
"service_tier": "priority",
"input_tokens_lte": 512000,
"input": 0.45,
"output": 1.8,
"cache_read": 0.09,
"cache_write": null
},
{
"service_tier": "priority",
"input_tokens_gt": 512000,
"input": 0.9,
"output": 3.6,
"cache_read": 0.18,
"cache_write": null
}
]
},
{
"id": "MiniMax-M2.7",
"tier": "development",
"context_window": 204800,
"max_output": 204800,
"input_modalities": ["text"],
"thinking": ["always_on"],
"pricing_usd_per_million_tokens": {
"input": 0.3,
"output": 1.2,
"cache_read": 0.06,
"cache_write": 0.375
}
}
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

What is the official maximum output token limit for MiniMax-M3 and MiniMax-M2.7 per MiniMax's API documentation?

💡 Result:

According to MiniMax's official documentation and resources, the maximum output token limits are as follows: For MiniMax-M3, the maximum output token limit is 512,000 tokens [1]. For MiniMax-M2.7, the documentation specifies a context window of 204,800 tokens [2][3] and indicates a maximum output of 128,000 tokens for the M2-series models [4]. Note that in the context of MiniMax's API, the maximum output limit (often configured via the max_tokens or max_completion_tokens parameter) is subject to the total model context window [2][5]. Users should refer to the specific parameters in the API request body—typically max_tokens or max_completion_tokens—when implementing their integrations [2][5][3].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="providers/model_catalog.json"

# Show the relevant section with line numbers.
sed -n '95,170p' "$file" | cat -n

Repository: asklokesh/loki-mode

Length of output: 2760


🌐 Web query:

MiniMax official documentation maximum output tokens MiniMax-M3 512000 524288 MiniMax-M2.7 128000 204800

💡 Result:

Based on official MiniMax documentation and associated technical specifications, the token limits for the specified models are as follows: MiniMax-M3: The context window supports up to 1,000,000 tokens [1][2]. Various technical aggregators and API providers report a maximum output token limit of 512,000 tokens [3][4][5][6]. MiniMax-M2.7: The context window is 204,800 tokens [7][8][9]. Technical documentation and community-maintained specifications typically cite a maximum output token limit of 128,000 tokens [10][11][12]. It is important to note that while official documentation provides clear context window figures [1][2][9], output token limits are frequently managed via the API's max_completion_tokens parameter [7][13], and specific maximums may vary by platform implementation [3][8]. Always verify the specific constraints via the model's metadata endpoint if building production integrations.

Citations:


Update the MiniMax output limits MiniMax-M3 should list max_output: 512000 instead of 524288, and MiniMax-M2.7 should list max_output: 128000 instead of 204800. The current values overstate the models’ output ceilings and can cause bad request sizing in downstream planning.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@providers/model_catalog.json` around lines 100 - 163, Update the max_output
values in the models array: set MiniMax-M3 to 512000 and MiniMax-M2.7 to 128000.
Leave all other model metadata and pricing unchanged.

@octo-patch

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Align MiniMax-M3 pricing_usd_per_million_tokens with the supported
catalog configuration (input 0.6, output 2.4, cache_read 0.12) and
update the corresponding test assertion.
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/test-minimax-model-catalog.sh`:
- Around line 17-106: Update the Python invocation wrapping the catalog
validation script to include the -E interpreter option before executing the
heredoc, ensuring environment-based optimization cannot remove the assert checks
in the validation code. Keep the existing catalog parsing and assertions
unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4161c3e9-83df-4ad2-9097-ac45ca736521

📥 Commits

Reviewing files that changed from the base of the PR and between cbbc94e and 7bf021e.

📒 Files selected for processing (4)
  • providers/model_catalog.json
  • tests/run-all-tests.sh
  • tests/test-minimax-model-catalog.sh
  • wiki/Providers.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/run-all-tests.sh
  • wiki/Providers.md

Comment on lines +17 to +106
if python3 - "$CATALOG" <<'PY'
import json
import sys

with open(sys.argv[1], encoding="utf-8") as handle:
catalog = json.load(handle)

provider = catalog["providers"]["minimax"]
assert provider["latest_planning"] == "MiniMax-M3"
assert provider["latest_development"] == "MiniMax-M3"
assert provider["latest_fast"] == "MiniMax-M3"

endpoints = {item["region"]: item for item in provider["endpoints"]}
assert endpoints == {
"global_en": {
"region": "global_en",
"openai_base_url": "https://api.minimax.io/v1",
"anthropic_base_url": "https://api.minimax.io/anthropic",
"docs_root": "https://platform.minimax.io/docs",
},
"cn_zh": {
"region": "cn_zh",
"openai_base_url": "https://api.minimaxi.com/v1",
"anthropic_base_url": "https://api.minimaxi.com/anthropic",
"docs_root": "https://platform.minimaxi.com/docs",
},
}
assert all(item["anthropic_base_url"].endswith("/anthropic") for item in endpoints.values())

models = {item["id"]: item for item in provider["models"]}
assert list(models)[:2] == ["MiniMax-M3", "MiniMax-M2.7"]

m3 = models["MiniMax-M3"]
assert m3["context_window"] == 1_000_000
assert m3["max_output"] == 524_288
assert m3["input_modalities"] == ["text", "image", "video"]
assert m3["thinking"] == ["adaptive", "disabled"]
assert m3["pricing_usd_per_million_tokens"] == {
"input": 0.6,
"output": 2.4,
"cache_read": 0.12,
"cache_write": None,
}
assert m3["pricing_tiers_usd_per_million_tokens"] == [
{
"service_tier": "standard",
"input_tokens_lte": 512_000,
"input": 0.3,
"output": 1.2,
"cache_read": 0.06,
"cache_write": None,
},
{
"service_tier": "standard",
"input_tokens_gt": 512_000,
"input": 0.6,
"output": 2.4,
"cache_read": 0.12,
"cache_write": None,
},
{
"service_tier": "priority",
"input_tokens_lte": 512_000,
"input": 0.45,
"output": 1.8,
"cache_read": 0.09,
"cache_write": None,
},
{
"service_tier": "priority",
"input_tokens_gt": 512_000,
"input": 0.9,
"output": 3.6,
"cache_read": 0.18,
"cache_write": None,
},
]

m27 = models["MiniMax-M2.7"]
assert m27["context_window"] == 204_800
assert m27["max_output"] == 204_800
assert m27["input_modalities"] == ["text"]
assert m27["thinking"] == ["always_on"]
assert m27["pricing_usd_per_million_tokens"] == {
"input": 0.3,
"output": 1.2,
"cache_read": 0.06,
"cache_write": 0.375,
}
PY

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

file="tests/test-minimax-model-catalog.sh"
block="$(sed -n '17,106p' "$file")"

grep -Fq 'assert provider["latest_planning"]' <<<"$block"
if grep -Eq '^[[:space:]]*if[[:space:]]+python3[[:space:]]+-E[[:space:]]+-' <<<"$block"; then
  echo "Python environment isolation is present."
else
  echo "Python assertions can be disabled by PYTHONOPTIMIZE."
  exit 1
fi

Repository: asklokesh/loki-mode

Length of output: 210


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

python3 - <<'PY'
import subprocess
import sys
import tempfile
import os

snippet = r'''
import json
from pathlib import Path
with open(Path(sys.argv[1]), encoding="utf-8") as handle:
    catalog = json.load(handle)
provider = catalog["providers"]["minimax"]
assert provider["latest_planning"] == "MiniMax-M3"
assert provider["latest_development"] == "MiniMax-M3"
print("OK", provider["latest_planning"])
'''

catalog = '{"providers":{"minimax":{"latest_planning":"MiniMax-M42","latest_development":"MiniMax-M42","endpoints":[],"models":[{"id":"MiniMax-M3","context_window":999}]}}}'

with tempfile.NamedTemporaryFile("w", delete=False, encoding="utf-8") as fh:
    fh.write(snippet)
    py_path = fh.name
with tempfile.NamedTemporaryFile("w", delete=False, encoding="utf-8") as fh:
    fh.write(catalog)
    json_path = fh.name

for env in [{}, {"PYTHONOPTIMIZE": "", "PYTHONDONTWRITEBYTECODE": "1"}, {"PYTHONOPTIMIZE": "2", "PYTHONDONTWRITEBYTECODE": "1"}]:
    env = dict(os.environ, **{k:v for k,v in env.items() if k == "PYTHONOPTIMIZE" or k == "PYTHONDONTWRITEBYTECODE" or k not in env})
    result = subprocess.run([sys.executable, "-E", py_path, json_path], capture_output=True, text=True, env=env)
    print("no flag", env.get("PYTHONOPTIMIZE"), "stdout=", result.stdout.strip(), "stderr=", result.stderr.strip(), "rc=", result.returncode)
    env = dict(os.environ, **{k:v for k,v in env.items() if k == "PYTHONOPTIMIZE" or k == "PYTHONDONTWRITEBYTECODE" or k not in env})
    result = subprocess.run([sys.executable, "-E", "-O", py_path, json_path], capture_output=True, text=True, env=env)
    print("-O", env.get("PYTHONOPTIMIZE"), "stdout=", result.stdout.strip(), "stderr=", result.stderr.strip(), "rc=", result.returncode)
PY

Repository: asklokesh/loki-mode

Length of output: 1430


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

python3 - <<'PY'
import subprocess
import sys
import tempfile
import os

snippet = r'''
import json
import sys
from pathlib import Path
with open(Path(sys.argv[1]), encoding="utf-8") as handle:
    catalog = json.load(handle)
provider = catalog["providers"]["minimax"]
assert provider["latest_planning"] == "MiniMax-M3"
assert provider["latest_development"] == "MiniMax-M3"
print("OK", provider["latest_planning"])
'''

catalog = '{"providers":{"minimax":{"latest_planning":"MiniMax-M42","latest_development":"MiniMax-M42","endpoints":[],"models":[{"id":"MiniMax-M3","context_window":999}]}}}'

with tempfile.NamedTemporaryFile("w", delete=False, encoding="utf-8") as fh:
    fh.write(snippet)
    py_path = fh.name
with tempfile.NamedTemporaryFile("w", delete=False, encoding="utf-8") as fh:
    fh.write(catalog)
    json_path = fh.name

print("python", sys.version.split()[0])
for optimize in [None, 0, 1, 2]:
    env = dict(os.environ)
    if optimize is None:
        env.pop("PYTHONOPTIMIZE", None)
    else:
        env["PYTHONOPTIMIZE"] = str(optimize)
    for args in ([py_path, json_path], ["-O", py_path, json_path]):
        result = subprocess.run([sys.executable] + args, capture_output=True, text=True, env=env)
        print("env_PyOPTIMIZE=", optimize, "args=", args, "rc=", result.returncode, "stdout=", result.stdout.strip(), "stderr=", result.stderr.strip())
PY

Repository: asklokesh/loki-mode

Length of output: 1299


Prevent optimized Python from disabling catalog checks.

PYTHONOPTIMIZE removes these assert checks, so the catalog test can pass after only parsing JSON. Use -E before invoking the validation script so the interpreter ignores environment-based optimization.

Proposed fix
-if python3 - "$CATALOG" <<'PY'
+if python3 -E - "$CATALOG" <<'PY'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if python3 - "$CATALOG" <<'PY'
import json
import sys
with open(sys.argv[1], encoding="utf-8") as handle:
catalog = json.load(handle)
provider = catalog["providers"]["minimax"]
assert provider["latest_planning"] == "MiniMax-M3"
assert provider["latest_development"] == "MiniMax-M3"
assert provider["latest_fast"] == "MiniMax-M3"
endpoints = {item["region"]: item for item in provider["endpoints"]}
assert endpoints == {
"global_en": {
"region": "global_en",
"openai_base_url": "https://api.minimax.io/v1",
"anthropic_base_url": "https://api.minimax.io/anthropic",
"docs_root": "https://platform.minimax.io/docs",
},
"cn_zh": {
"region": "cn_zh",
"openai_base_url": "https://api.minimaxi.com/v1",
"anthropic_base_url": "https://api.minimaxi.com/anthropic",
"docs_root": "https://platform.minimaxi.com/docs",
},
}
assert all(item["anthropic_base_url"].endswith("/anthropic") for item in endpoints.values())
models = {item["id"]: item for item in provider["models"]}
assert list(models)[:2] == ["MiniMax-M3", "MiniMax-M2.7"]
m3 = models["MiniMax-M3"]
assert m3["context_window"] == 1_000_000
assert m3["max_output"] == 524_288
assert m3["input_modalities"] == ["text", "image", "video"]
assert m3["thinking"] == ["adaptive", "disabled"]
assert m3["pricing_usd_per_million_tokens"] == {
"input": 0.6,
"output": 2.4,
"cache_read": 0.12,
"cache_write": None,
}
assert m3["pricing_tiers_usd_per_million_tokens"] == [
{
"service_tier": "standard",
"input_tokens_lte": 512_000,
"input": 0.3,
"output": 1.2,
"cache_read": 0.06,
"cache_write": None,
},
{
"service_tier": "standard",
"input_tokens_gt": 512_000,
"input": 0.6,
"output": 2.4,
"cache_read": 0.12,
"cache_write": None,
},
{
"service_tier": "priority",
"input_tokens_lte": 512_000,
"input": 0.45,
"output": 1.8,
"cache_read": 0.09,
"cache_write": None,
},
{
"service_tier": "priority",
"input_tokens_gt": 512_000,
"input": 0.9,
"output": 3.6,
"cache_read": 0.18,
"cache_write": None,
},
]
m27 = models["MiniMax-M2.7"]
assert m27["context_window"] == 204_800
assert m27["max_output"] == 204_800
assert m27["input_modalities"] == ["text"]
assert m27["thinking"] == ["always_on"]
assert m27["pricing_usd_per_million_tokens"] == {
"input": 0.3,
"output": 1.2,
"cache_read": 0.06,
"cache_write": 0.375,
}
PY
if python3 -E - "$CATALOG" <<'PY'
import json
import sys
with open(sys.argv[1], encoding="utf-8") as handle:
catalog = json.load(handle)
provider = catalog["providers"]["minimax"]
assert provider["latest_planning"] == "MiniMax-M3"
assert provider["latest_development"] == "MiniMax-M3"
assert provider["latest_fast"] == "MiniMax-M3"
endpoints = {item["region"]: item for item in provider["endpoints"]}
assert endpoints == {
"global_en": {
"region": "global_en",
"openai_base_url": "https://api.minimax.io/v1",
"anthropic_base_url": "https://api.minimax.io/anthropic",
"docs_root": "https://platform.minimax.io/docs",
},
"cn_zh": {
"region": "cn_zh",
"openai_base_url": "https://api.minimaxi.com/v1",
"anthropic_base_url": "https://api.minimaxi.com/anthropic",
"docs_root": "https://platform.minimaxi.com/docs",
},
}
assert all(item["anthropic_base_url"].endswith("/anthropic") for item in endpoints.values())
models = {item["id"]: item for item in provider["models"]}
assert list(models)[:2] == ["MiniMax-M3", "MiniMax-M2.7"]
m3 = models["MiniMax-M3"]
assert m3["context_window"] == 1_000_000
assert m3["max_output"] == 524_288
assert m3["input_modalities"] == ["text", "image", "video"]
assert m3["thinking"] == ["adaptive", "disabled"]
assert m3["pricing_usd_per_million_tokens"] == {
"input": 0.6,
"output": 2.4,
"cache_read": 0.12,
"cache_write": None,
}
assert m3["pricing_tiers_usd_per_million_tokens"] == [
{
"service_tier": "standard",
"input_tokens_lte": 512_000,
"input": 0.3,
"output": 1.2,
"cache_read": 0.06,
"cache_write": None,
},
{
"service_tier": "standard",
"input_tokens_gt": 512_000,
"input": 0.6,
"output": 2.4,
"cache_read": 0.12,
"cache_write": None,
},
{
"service_tier": "priority",
"input_tokens_lte": 512_000,
"input": 0.45,
"output": 1.8,
"cache_read": 0.09,
"cache_write": None,
},
{
"service_tier": "priority",
"input_tokens_gt": 512_000,
"input": 0.9,
"output": 3.6,
"cache_read": 0.18,
"cache_write": None,
},
]
m27 = models["MiniMax-M2.7"]
assert m27["context_window"] == 204_800
assert m27["max_output"] == 204_800
assert m27["input_modalities"] == ["text"]
assert m27["thinking"] == ["always_on"]
assert m27["pricing_usd_per_million_tokens"] == {
"input": 0.3,
"output": 1.2,
"cache_read": 0.06,
"cache_write": 0.375,
}
PY
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test-minimax-model-catalog.sh` around lines 17 - 106, Update the Python
invocation wrapping the catalog validation script to include the -E interpreter
option before executing the heredoc, ensuring environment-based optimization
cannot remove the assert checks in the validation code. Keep the existing
catalog parsing and assertions unchanged.

@octo-patch

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I resolved the merge conflict against current main and pushed commit 7bf021e. Targeted MiniMax catalog, single-source, flagship-consistency, provider-scoping, JSON, and shell-syntax checks passed; the generic-tier suite is blocked locally by macOS Bash 3.2 lacking mapfile.

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.

1 participant