Add MiniMax tokenizer calibration support - #265
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: Add first-party MiniMax tokenizer calibration support for the current text models and both regional OpenAI-compatible endpoints.
Changes:
minimaxandminimax-cncalibration requests to their respective chat-completions endpoints.MiniMax-M3andMiniMax-M2.7for both regional routes.Checks:
bun test packages/plugin/scripts/calibrate-tokenizer/providers/openai-compatible.test.tsbun run --cwd packages/plugin typecheckgit diff --checkjq -e '.tests | length > 0' packages/plugin/scripts/calibrate-tokenizer/models.jsonbun run --cwd packages/plugin lint(currently fails on unrelated existing diagnostics and the checked-in Biome schema version mismatch)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Add MiniMax tokenizer calibration for
MiniMax-M3andMiniMax-M2.7across global and China OpenAI‑compatible endpoints. This enables measuring system and tool token deltas for MiniMax via chat completions.minimaxto https://api.minimax.io/v1/chat/completions andminimax-cnto https://api.minimaxi.com/v1/chat/completions.MiniMax-M3andMiniMax-M2.7under both providers inmodels.json.Written for commit c4ffff6. Summary will update on new commits.
Greptile Summary
Adds tokenizer-calibration coverage for MiniMax’s current text models across its global and China OpenAI-compatible endpoints.
Confidence Score: 5/5
The PR appears safe to merge with no actionable correctness or security failures identified.
The added provider identifiers route to distinct supported endpoints, the catalog entries follow existing runner contracts, and the tests exercise both regional routes and token-delta calculations.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR C[MiniMax calibration catalog entry] --> P{Provider} P -->|minimax| G[api.minimax.io] P -->|minimax-cn| CN[api.minimaxi.com] G --> R[OpenAI-compatible chat completions] CN --> R R --> U[Read usage.prompt_tokens] U --> D[Calculate system and tool deltas]Reviews (1): Last reviewed commit: "feat(calibration): add MiniMax provider ..." | Re-trigger Greptile