Skip to content

fix(models): keep legacy MiniMax routes explicit-only - #489

Closed
octo-patch wants to merge 3 commits into
BlockRunAI:mainfrom
octo-patch:octo/minimax-current-catalog
Closed

octo-patch wants to merge 3 commits into
BlockRunAI:mainfrom
octo-patch:octo/minimax-current-catalog

Conversation

@octo-patch

@octo-patch octo-patch commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Reason: MiniMax M2.7 is still promoted in the default picker and API discovery alongside M3. Keep M3 as the current advertised MiniMax text option while preserving explicit legacy selections and their gateway metadata.

  • Mark M2.7/M2.5 as explicit-only in the local metadata registry; omit their IDs and aliases from ordinary discovery, including after live catalog refreshes. Keep aliases, pricing, capabilities, and direct requests available for compatibility.
  • Remove M2.7 from the shared picker list and legacy rows from the current README table. Default router-core tiers already use M3, so their behavior is unchanged.
  • Preserve explicitly selected legacy models through config injection, per-agent cache repair, runtime registration, and install/update allowlist synchronization. Cover saved defaults, fallbacks, per-agent models, compaction selections, and nonempty custom model settings.
  • Include rebuilt tracked distribution files, following repository convention. After merging current upstream normally, the build also incorporates upstream catalog changes already present in the merged source. This change does not modify media-model source or historical benchmark/changelog records.
  • Retain upstream's frozen-config handling and preserve explicit MiniMax pins inside its runtime configuration helper, with a regression test.

The public Base catalog and Solana catalog were checked again on 2026-10-20 before publication. Neither lists a MiniMax Flash route, so this PR does not claim Flash support or invent an ID. M3 retains the gateway's context 1,048,576, maximum output 65,536, and $0.30/$1.20 per-million input/output prices; direct-provider limits/prices are not substituted.

Validation:

  • Isolated Node 24 installation using npm ci --ignore-scripts.
  • npm test on the final merged head — 1,235 passed, one skipped; hermetic suite.
  • npx vitest run --config vitest.integration.config.ts test/integration/security-scanner.test.ts — both static scanner tests passed.
  • npm run typecheck, npm run lint, npm run build and distribution smoke checks — passed.
  • npx prettier --check ., node scripts/sync-brand-numbers.mjs --check, and shell syntax checks for both installer scripts — passed.
  • Local HTTP proxy tests capture actual serialized model IDs and auth headers for M3, legacy aliases/direct pins, a custom ID, and a user-supplied legacy routing override. Both-network catalog refresh tests verify M2.7 does not reappear in discovery. Saved-selection tests exercise config/cache updates and the installer synchronization code without running an installer.
  • Staged whitespace and conventional commit subject checks passed. Baseline-aware secret scan found zero new matches; 26 matches in regenerated source maps were identical to existing baseline strings.

No paid inference, wallet transactions, or live model capability probes were performed. Public catalog reads establish route availability and gateway metadata only; packaged desktop UI and external integration services were not exercised.

Summary by CodeRabbit

  • New Features

    • Updated the advertised MiniMax model to MiniMax M3 with existing pricing and limits.
    • Legacy MiniMax M2.5 and M2.7 selections remain usable and resolvable when explicitly configured.
    • Saved model selections are preserved across configuration refreshes and agent cache updates.
    • Added support for retaining configured models in refreshed model lists.
  • Bug Fixes

    • Prevented legacy selections from being lost during provider, runtime, or cache synchronization.
    • Improved model routing and proxy handling for current, legacy, custom, and automatic requests.
  • Documentation

    • Clarified MiniMax availability across Base and Solana catalogs, including unchanged music-generation support.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: BlockRunAI/ClawRouter/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 738f4b6d-7a2a-4f81-b5a7-6b10a276412c
📥 Commits

Reviewing files that changed from the base of the PR and between d4954d0 and 74127d4.

⛔ Files ignored due to path filters: 5
  • dist/cli.js is excluded by !**/dist/**
  • dist/cli.js.map is excluded by !**/dist/**, !**/*.map
  • dist/index.d.ts is excluded by !**/dist/**
  • dist/index.js is excluded by !**/dist/**
  • dist/index.js.map is excluded by !**/dist/**, !**/*.map
📒 Files selected for processing: 5
  • README.md
  • src/index.readonly-config.test.ts
  • src/index.ts
  • src/models.ts
  • src/top-models.json
💤 Files with no reviewable changes: 1
  • src/top-models.json
🚧 Files skipped from review as they are similar to previous changes: 1
  • README.md

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

📝 Walkthrough

The MiniMax catalog now exposes M3 while marking M2.5 and M2.7 as explicit-only. Configuration refresh and runtime synchronization preserve explicitly selected legacy models without adding them to discovery.

Changes: MiniMax catalog and configuration

Layer / File(s) Summary
Catalog visibility and routing
src/models.ts, src/model-catalog.ts, src/top-models.json, README.md, src/minimax-catalog.test.ts
M2.5 and M2.7 are excluded from discovery and default selection, while explicit resolution remains available. Tests and documentation cover M3 metadata, legacy routing, and proxy forwarding.
Preserve configured legacy models
scripts/reinstall.sh, scripts/update.sh, src/models.ts, src/index.ts, src/index.agent-cache.test.ts, src/index.lifecycle.test.ts, src/index.readonly-config.test.ts, src/minimax-catalog.test.ts
Configuration scanning preserves explicitly configured models during allowlist refresh. Runtime synchronization applies pinned model lists to provider configuration and agent caches.

Priority: ⬇️ Low

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

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant OpenClawConfig
  participant withPinnedModels
  participant ModelCatalog
  participant AgentCache
  participant BlockRunProvider
  OpenClawConfig->>withPinnedModels: provide configured model references
  withPinnedModels->>ModelCatalog: resolve pinned model metadata
  ModelCatalog-->>withPinnedModels: return catalog metadata
  withPinnedModels-->>AgentCache: provide pinned model list
  withPinnedModels-->>BlockRunProvider: provide pinned model list
Loading

Suggested reviewers: 0xcheetah1, killerqueen-z

Merge Risk: ⚪ Minimal · up to 74127

Legacy MiniMax models remain available when explicitly selected without appearing in ordinary discovery. No identified issue needs resolution before merge.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 62.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 9 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: keeping legacy MiniMax routes available only through explicit selection.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 62.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 9 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@VickyXAI VickyXAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the thorough write-up, but we're not taking this one.

ClawRouter follows BlockRun's catalog rather than setting its own model visibility. Both public gateways (Base and Solana) list minimax/minimax-m2.7 today as available and not hidden, and blockrun's models.ts has it available: true. Hiding it from discovery here would make the proxy disagree with the gateway it fronts. If M2.7 is going to be retired from the picker, that starts in blockrun and ClawRouter syncs to it.

Separately, the change adds a third visibility mechanism (explicitOnly). That means config-walking pin preservation duplicated across src/index.ts, scripts/reinstall.sh and scripts/update.sh, plus a new failure mode: syncAgentModelCache now returns early on an unreadable openclaw.json, so a malformed config skips the per-agent cache repair entirely. That's a lot of surface to hide one model the upstream still sells.

(minimax/minimax-m2.5 is already gone from both catalogs; dropping it from BLOCKRUN_MODELS would fit in a routine catalog sync if you'd like to send that on its own.)

@VickyXAI VickyXAI closed this Oct 20, 2026
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