feat(model): add MiniMax provider prefix for cross-platform model normalization#463
Merged
Merged
Conversation
…malization Add minimax- pattern recognition to addProviderPrefix() so MiniMax models (e.g. minimax-m2.7, MiniMax-M2.5-highspeed) are correctly namespaced as minimax/ when converting plugins for multi-provider platforms (OpenCode, Qwen, OpenClaw). Uses case-insensitive matching to handle both minimax- and MiniMax- conventions.
Collaborator
|
nice work @octo-patch, tx for contribution |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds MiniMax model recognition to the
addProviderPrefix()function insrc/utils/model.ts, so that MiniMax models (e.g.minimax-m2.7,MiniMax-M2.5-highspeed) are correctly namespaced asminimax/when converting plugins for multi-provider target platforms.Changes
src/utils/model.ts: Addminimax-pattern (case-insensitive) toaddProviderPrefix(), mapping MiniMax model IDs to theminimax/provider prefixtests/model-utils.test.ts: Add unit tests for MiniMax model prefixing (lowercase, highspeed variant, PascalCase)tests/qwen-converter.test.ts: Add converter test verifying MiniMax models getminimax/prefix in Qwen outputtests/openclaw-converter.test.ts: Add converter test verifying MiniMax models getminimax/prefix in OpenClaw outputHow it works
MiniMax is a cloud LLM provider with models like
MiniMax-M2.7andMiniMax-M2.5-highspeed(204K context). Multi-provider target platforms (OpenCode, Qwen, OpenClaw) need provider-prefixed model IDs to route requests correctly. This change ensures:minimax-m2.7minimax/minimax-m2.7minimax-m2.5-highspeedminimax/minimax-m2.5-highspeedMiniMax-M2.7minimax/MiniMax-M2.7Case-insensitive matching handles both
minimax-andMiniMax-conventions used in the wild.Test plan
bun test tests/model-utils.test.ts- unit tests for MiniMax prefixbun test tests/qwen-converter.test.ts- Qwen converter integrationbun test tests/openclaw-converter.test.ts- OpenClaw converter integrationbun test- full suite (532 pass, 1 pre-existing failure in resolve-base-script.test.ts)