Skip to content

add MiniMax-M3 to model catalog - #179

Closed
octo-patch wants to merge 2 commits into
asklokesh:mainfrom
octo-patch:octo/20260708-add-target-provider-model-to-existing-provider-registry-recvoLiZpkPvsc
Closed

add MiniMax-M3 to model catalog#179
octo-patch wants to merge 2 commits into
asklokesh:mainfrom
octo-patch:octo/20260708-add-target-provider-model-to-existing-provider-registry-recvoLiZpkPvsc

Conversation

@octo-patch

Copy link
Copy Markdown
Contributor

Reason: add target provider/model to existing provider registry

Summary

  • Register MiniMax-M3 in the canonical model catalog with global and China OpenAI/Anthropic-compatible endpoints.
  • Add MiniMax-M3 pricing to the model pricing table, including cache input pricing.

Test plan

  • Secret scan with the provided Octopatch regex
  • python3 -m json.tool providers/model_catalog.json
  • python3 -m json.tool loki-ts/data/model-pricing.json
  • bash tests/test-model-and-port.sh
  • bash tests/test-model-override.sh (environment issue: hung after installing dashboard dependencies)

Generated by Octopatch.

Register MiniMax-M3 metadata and pricing so the existing catalog can surface the provider's OpenAI and Anthropic-compatible endpoints.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@octo-patch
octo-patch requested a review from asklokesh as a code owner July 9, 2026 09:31
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution. Before we can merge this, you need to sign our Contributor License Agreement.
Please comment below with exactly this text to sign:
I have read the CLA Document and I hereby sign the CLA


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


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a20c763a-8141-4118-9306-08dd27b4be11

📥 Commits

Reviewing files that changed from the base of the PR and between 0893f54 and 00be99b.

📒 Files selected for processing (1)
  • providers/model_catalog.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • providers/model_catalog.json

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added MiniMax-M3 to the model pricing table, including input, output, and cached input rates.
    • Expanded the model catalog with a new MiniMax provider entry.
    • Included latest model mappings, regional endpoint options, and MiniMax-M3 metadata (context window, thinking modes, and compatibility notes).

Walkthrough

Added MiniMax-M3 pricing and a new minimax provider catalog entry with model mappings, regional endpoints, compatibility URLs, and model metadata.

Changes

MiniMax-M3 Provider and Pricing

Layer / File(s) Summary
MiniMax-M3 pricing and provider configuration
loki-ts/data/model-pricing.json, providers/model_catalog.json
Adds MiniMax-M3 input, output, and cached-input pricing, plus minimax model mappings, OpenAI/Anthropic-compatible URLs, regional endpoints, context metadata, thinking modes, and documentation links.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Poem

A new model hops into the den,
MiniMax-M3 joins the warren again.
Prices and pathways neatly align,
Global and CN endpoints shine.
🐇✨ The catalog grows fine!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding MiniMax-M3 to the model catalog.
Description check ✅ Passed The description is directly related to the changes and summarizes the new MiniMax-M3 catalog and pricing entries.
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

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: 2

🤖 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 `@loki-ts/data/model-pricing.json`:
- Line 12: The MiniMax-M3 pricing entry is keyed with mixed case, but
pricingFor() lowercases model names before looking up PRICING, so the lookup
always misses. Update the pricing map entry in model-pricing.json to use the
normalized lowercase key minmax-m3/minimax-m3, or add key normalization where
PRICING is loaded, so pricingFor() matches the stored symbol consistently.

In `@providers/model_catalog.json`:
- Around line 82-113: The minimax provider entry includes per-region endpoint
data that is never consumed by the current schema, so `cn_zh` still won’t route
correctly. Update the `minimax` block in `providers/model_catalog.json` to
either fit the per-region schema used by the catalog consumers or remove the
unused `endpoints`/`region`/`docs_root` fields entirely; use the existing
`latest_*` and `models[]` structure as the source of truth and ensure the
Minimax China base URLs are actually represented where the provider runners and
`dashboard/server.py` read them.
🪄 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: fe45be71-a432-4629-88b9-150be0e7402a

📥 Commits

Reviewing files that changed from the base of the PR and between 057fa07 and 0893f54.

📒 Files selected for processing (2)
  • loki-ts/data/model-pricing.json
  • providers/model_catalog.json

"haiku": { "input": 1.0, "output": 5.0 },
"gpt-5.3-codex": { "input": 1.75, "output": 14.0 }
"gpt-5.3-codex": { "input": 1.75, "output": 14.0 },
"MiniMax-M3": { "input": 0.6, "output": 2.4, "cache_input": 0.12 }

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

🏁 Script executed:

#!/bin/bash
# Confirm how the model name string reaches pricingFor() (case) for minimax models,
# and whether any normalization/alias-resolution happens before the pricing lookup.
rg -n -B3 -A10 'function pricingFor' loki-ts/src/runner/budget.ts
rg -nP 'MiniMax-M3|minimax-m3' -C3 --type=ts loki-ts

Repository: asklokesh/loki-mode

Length of output: 801


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the pricing table load path and nearby helpers.
sed -n '1,220p' loki-ts/src/runner/budget.ts
printf '\n--- model-pricing.json ---\n'
cat -n loki-ts/data/model-pricing.json

printf '\n--- model-name usages ---\n'
rg -n -C3 'MiniMax-M3|minimax-m3|toLowerCase\(\)|PRICING\[' loki-ts/src loki-ts/data

Repository: asklokesh/loki-mode

Length of output: 21854


Lowercase the MiniMax-M3 pricing key
pricingFor() lowercases model names before indexing PRICING, but this entry is still MiniMax-M3, so every MiniMax-M3 lookup misses and falls back to sonnet pricing. Rename the key to minimax-m3 or normalize keys when loading.

🤖 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 `@loki-ts/data/model-pricing.json` at line 12, The MiniMax-M3 pricing entry is
keyed with mixed case, but pricingFor() lowercases model names before looking up
PRICING, so the lookup always misses. Update the pricing map entry in
model-pricing.json to use the normalized lowercase key minmax-m3/minimax-m3, or
add key normalization where PRICING is loaded, so pricingFor() matches the
stored symbol consistently.

Comment on lines +82 to +113
"minimax": {
"latest_planning": "MiniMax-M3",
"latest_development": "MiniMax-M3",
"latest_fast": "MiniMax-M3",
"openai_base_url": "https://api.minimax.io/v1",
"anthropic_base_url": "https://api.minimax.io/anthropic/v1",
"endpoints": [
{
"region": "global_en",
"openai_base_url": "https://api.minimax.io/v1",
"anthropic_base_url": "https://api.minimax.io/anthropic/v1",
"docs_root": "https://platform.minimax.io/docs"
},
{
"region": "cn_zh",
"openai_base_url": "https://api.minimaxi.com/v1",
"anthropic_base_url": "https://api.minimaxi.com/anthropic/v1",
"docs_root": "https://platform.minimaxi.com/docs"
}
],
"models": [
{
"id": "MiniMax-M3",
"tier": "development",
"context_window": 1000000,
"input_price_per_mtok": 0.6,
"output_price_per_mtok": 2.4,
"cache_input_price_per_mtok": 0.12,
"thinking": ["adaptive", "disabled"],
"notes": "Anthropic-compatible endpoint requires /anthropic/v1. Docs: https://platform.minimax.io/docs/api-reference/api-overview and https://platform.minimaxi.com/docs/api-reference/api-overview."
}
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find the catalog loader/consumer to check if it reads `endpoints`, `region`, or `docs_root`.
rg -nP '\bendpoints\b|\bdocs_root\b|model_catalog' -C3 --type=ts --type=js -g '!**/node_modules/**' | head -100

Repository: asklokesh/loki-mode

Length of output: 157


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== top-level files =="
git ls-files | sed -n '1,200p'

echo
echo "== model_catalog references =="
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' \
  'model_catalog\.json|model_catalog|endpoints|docs_root|anthropic_base_url|openai_base_url|region' \
  . -g '!**/.git/**' -C 2 | sed -n '1,250p'

Repository: asklokesh/loki-mode

Length of output: 25735


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'repo root: '; pwd
echo

echo "== files likely related to provider catalogs =="
fd -a 'model_catalog.json|catalog|provider' . -t f | sed -n '1,200p'

echo
echo "== exact references =="
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' \
  'model_catalog\.json|model_catalog|endpoints|docs_root|anthropic_base_url|openai_base_url|region' \
  . -C 2 | sed -n '1,300p'

Repository: asklokesh/loki-mode

Length of output: 30305


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== potential catalog-related files =="
git ls-files | rg '(^|/)(model_catalog\.json|.*catalog.*|.*provider.*|.*loader.*|.*config.*)\.(json|ts|js|mjs|cjs|py|go|rs|rb|java|kt)$'

echo
echo "== direct mentions anywhere =="
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' \
  'model_catalog\.json|endpoints|docs_root|anthropic_base_url|openai_base_url|region|MiniMax-M3|minimax' \
  . -C 3 | sed -n '1,250p'

Repository: asklokesh/loki-mode

Length of output: 22728


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== tools/probe-model-catalog.py =="
wc -l tools/probe-model-catalog.py
sed -n '1,260p' tools/probe-model-catalog.py

echo
echo "== loki-ts/src/runner/providers.ts =="
wc -l loki-ts/src/runner/providers.ts
sed -n '1,260p' loki-ts/src/runner/providers.ts

echo
echo "== providers/managed.py =="
wc -l providers/managed.py
sed -n '1,260p' providers/managed.py

Repository: asklokesh/loki-mode

Length of output: 26376


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== outline: loki-ts/src/runner/providers.ts =="
ast-grep outline loki-ts/src/runner/providers.ts --view expanded | sed -n '1,240p'

echo
echo "== outline: providers/managed.py =="
ast-grep outline providers/managed.py --view expanded | sed -n '1,240p'

echo
echo "== outline: tools/probe-model-catalog.py =="
ast-grep outline tools/probe-model-catalog.py --view expanded | sed -n '1,240p'

Repository: asklokesh/loki-mode

Length of output: 3557


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== exact model_catalog.json references =="
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' \
  'model_catalog\.json' . -C 3

echo
echo "== tools/probe-model-catalog.py =="
wc -l tools/probe-model-catalog.py
sed -n '1,260p' tools/probe-model-catalog.py

echo
echo "== providers/managed.py =="
wc -l providers/managed.py
sed -n '1,260p' providers/managed.py

echo
echo "== loki-ts/src/runner/providers.ts =="
wc -l loki-ts/src/runner/providers.ts
sed -n '1,260p' loki-ts/src/runner/providers.ts

Repository: asklokesh/loki-mode

Length of output: 46531


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== providers/models.sh =="
wc -l providers/models.sh
sed -n '1,240p' providers/models.sh

echo
echo "== dashboard/server.py provider-model endpoint =="
sed -n '1020,1065p' dashboard/server.py

echo
echo "== web-app/provider catalog consumers =="
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' \
  '/api/providers/models|providers/model_catalog\.json|provider.*models|model catalog|latest_planning|latest_development|latest_fast' \
  web-app dashboard-ui dashboard loki-ts tests providers -C 2 | sed -n '1,260p'

Repository: asklokesh/loki-mode

Length of output: 20171


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== providers/models.sh =="
wc -l providers/models.sh
sed -n '1,240p' providers/models.sh

echo
echo "== dashboard/server.py provider-model endpoint =="
sed -n '1020,1065p' dashboard/server.py

echo
echo "== consumer references for /api/providers/models and catalog fields =="
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' \
  '/api/providers/models|providers/model_catalog\.json|endpoints|docs_root|region' \
  web-app dashboard-ui dashboard loki-ts tests providers -C 2 | sed -n '1,260p'

Repository: asklokesh/loki-mode

Length of output: 22351


Wire minimax into the per-region schema, or remove the unused fields. providers/models.sh, dashboard/server.py, and the provider runners only read latest_* / models[]; endpoints, region, and docs_root are just pass-through JSON here, so cn_zh never routes to api.minimaxi.com.

🤖 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 - 113, The minimax provider
entry includes per-region endpoint data that is never consumed by the current
schema, so `cn_zh` still won’t route correctly. Update the `minimax` block in
`providers/model_catalog.json` to either fit the per-region schema used by the
catalog consumers or remove the unused `endpoints`/`region`/`docs_root` fields
entirely; use the existing `latest_*` and `models[]` structure as the source of
truth and ensure the Minimax China base URLs are actually represented where the
provider runners and `dashboard/server.py` read them.

@octo-patch

Copy link
Copy Markdown
Contributor Author

This PR has been replaced by #180, rebuilt from the latest main with both target model IDs, complete tiered pricing metadata, and usable regional API configuration. Please continue review in #180.

@octo-patch octo-patch closed this Jul 13, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant