feat: add MiniMax provider support to benchmark tools#777
Open
octo-patch wants to merge 1 commit intoMemPalace:developfrom
Open
feat: add MiniMax provider support to benchmark tools#777octo-patch wants to merge 1 commit intoMemPalace:developfrom
octo-patch wants to merge 1 commit intoMemPalace:developfrom
Conversation
- Add _llm_base_url() helper that routes MiniMax models to https://api.minimax.io/anthropic (Anthropic-compatible endpoint) and Claude models to https://api.anthropic.com - Update _llm_call() and llm_rerank_locomo() in locomo_bench.py to use the correct endpoint based on model name - Update diary_ingest_session() and llm_rerank() in longmemeval_bench.py with the same routing logic - Update _load_api_key() in both files to check MINIMAX_API_KEY env var when a MiniMax model is specified, falling back to ANTHROPIC_API_KEY - Support MINIMAX_BASE_URL env var to override the default MiniMax endpoint (useful for domestic users: https://api.minimaxi.com/anthropic) - Supported models: MiniMax-M2.7, MiniMax-M2.7-highspeed - Add 16 unit tests covering URL routing and API key selection logic Usage: python benchmarks/locomo_bench.py data.json --mode hybrid --llm-rerank \ --llm-model MiniMax-M2.7 MINIMAX_API_KEY=<key> python benchmarks/longmemeval_bench.py data.json \ --mode diary --llm-model MiniMax-M2.7
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 LLM provider support to the benchmark evaluation tools (
locomo_bench.pyandlongmemeval_bench.py), enabling researchers to benchmark MemPalace memory retrieval using MiniMax models as the LLM scorer instead of being locked in to Anthropic.Changes
benchmarks/locomo_bench.py: Added_llm_base_url()helper that routesMiniMax-*model names to MiniMax's Anthropic-compatible endpoint (https://api.minimax.io/anthropic) and Claude models tohttps://api.anthropic.com. Updated_llm_call(),llm_rerank_locomo(), and_load_api_key()to use the correct endpoint and API key.benchmarks/longmemeval_bench.py: Same changes applied todiary_ingest_session(),llm_rerank(), and_load_api_key().tests/test_benchmark_minimax.py: 16 unit tests covering URL routing and API key selection for both benchmark files.Supported Models
MiniMax-M2.7MiniMax-M2.7-highspeedMiniMax uses an Anthropic-compatible API, so the same request format and
x-api-keyheader are used — only the base URL changes.Usage
API Reference