feat: add MiniMax as LLM provider in caption annotation pipeline#33
Open
octo-patch wants to merge 1 commit intoNJU-3DV:mainfrom
Open
feat: add MiniMax as LLM provider in caption annotation pipeline#33octo-patch wants to merge 1 commit intoNJU-3DV:mainfrom
octo-patch wants to merge 1 commit intoNJU-3DV:mainfrom
Conversation
- Add MiniMax provider detection (api.minimax.io) in caption/utils/api_call.py with proper OpenAI-compatible endpoint routing - Temperature is set to 0.1, within MiniMax's required (0.0, 1.0] range - Unify response extraction path (both branches used identical logic) - Add Supported LLM Providers table and MiniMax usage examples in caption/README.md - Add caption/tests/test_api_call.py: 12 unit tests + 3 integration tests covering MiniMax endpoint, temperature, auth header, multimodal content, and backward compatibility for Qwen/Gemini providers
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
This PR adds MiniMax as a supported LLM provider in the SpatialVID caption annotation pipeline.
Changes
caption/utils/api_call.py: Detectapi.minimax.ioinbase_domainand route to MiniMax's OpenAI-compatible endpoint (/v1/chat/completions). Temperature is kept at0.1, within MiniMax's required(0.0, 1.0]range. The duplicated response-extraction branches are unified into a single return path.caption/README.md: Add a Supported LLM Providers table listing MiniMax, Qwen, and Gemini with their--base_domainvalues, plus concrete MiniMax usage examples forLLM/inference.pyandtagging/inference.py.caption/tests/test_api_call.py: 12 unit tests (mock-based) + 3 integration tests against the live MiniMax API, covering endpoint routing, temperature constraints, auth headers, multimodal list content, and backward compatibility with Qwen/Gemini.Usage
MiniMax models supported:
MiniMax-M2.7— Peak Performance. Ultimate Value. Master the Complex (204K context)MiniMax-M2.7-highspeed— Same performance, faster and more agile (204K context)API keys: platform.minimax.io
API reference: https://platform.minimax.io/docs/api-reference/text-openai-api