Add MiniMax-M3 and MiniMax-M2.7 input token limits - #25
Open
octo-patch wants to merge 1 commit into
Open
Conversation
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.
Reason: parameter-refresh — add MiniMax-M3 (1,000,000) and MiniMax-M2.7 (204,800) input token limits so the OpenAI-compatible client stops falling back to the 131,072 default.
Changes
packages/core/src/core/tokenLimits.ts: add vendor-declared exact context-window entries (minimax-m3: 1,000,000;minimax-m2.7: 204,800) toLIMITS, and add first-match regex patterns forminimax-m2.7(more specific, dotted) andminimax-m3toPATTERNS. Values are taken verbatim from the vendor-declared context windows rather than the power-of-two approximations used elsewhere, matching the existing convention for vendor-declared decimal limits (e.g.200k -> 200_000).packages/core/src/core/tokenLimits.test.ts: add aMiniMaxtest suite covering case-insensitivity, theMiniMax-M3andMiniMax-M2.7limits, date-suffix normalization, and explicit assertions that neither model falls back toDEFAULT_TOKEN_LIMIT.Checks
vitest run src/core/tokenLimits.test.ts— 65 tests passed (including the new MiniMax cases).prettier --checkon both modified files — all matched files use Prettier code style.tsc --noEmitinpackages/core— no errors introduced by this change (the only reported error is a pre-existing missing@types/uuiddeclaration insrc/utils/openaiLogger.ts, unrelated to this diff).