Open
Conversation
MiniMax provides an OpenAI-compatible API, so we route requests to their endpoint (https://api.minimaxi.com/v1) when the model name starts with "minimax". This keeps the existing OpenAI flow unchanged. Changes: - Add MINIMAX_API_KEY env var and base_url routing in utils.py - Fix tiktoken fallback for non-OpenAI models (cl100k_base) - Update README with MiniMax API key setup and model options Usage: python3 run_pageindex.py --pdf_path doc.pdf --model MiniMax-M2.5 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add explicit --provider flag (openai/minimax) instead of auto-detecting by model name - Add --api-base-url option for custom API endpoints - Update MiniMax base URL to https://api.minimax.io/v1 - Enhance README with detailed provider documentation and usage examples - Support environment variables LLM_PROVIDER and API_BASE_URL This gives users more control over LLM routing and makes it easier to use custom endpoints or switch providers without changing model names. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Made-with: Cursor
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
https://api.minimaxi.com/v1)cl100k_basefor non-OpenAI modelsUsage
Supported MiniMax models:
MiniMax-M1,MiniMax-M2.5,MiniMax-M2.5-highspeed, etc.Design
Since MiniMax provides an OpenAI-compatible API, the implementation reuses the existing OpenAI SDK client by passing a custom
base_url. A helper function_get_client_kwargs()selects the right credentials and endpoint based on the model name. No new dependencies required.Test plan
Relates to #150
🤖 Generated with Claude Code