feat: add MiniMax & ZHIPU(Z.ai) CN region endpoint support#41
Merged
prakersh merged 3 commits intoonllm-dev:mainfrom Mar 24, 2026
Merged
feat: add MiniMax & ZHIPU(Z.ai) CN region endpoint support#41prakersh merged 3 commits intoonllm-dev:mainfrom
prakersh merged 3 commits intoonllm-dev:mainfrom
Conversation
Use www.minimaxi.com endpoint when MINIMAX_REGION=cn is set. Remove GroupId requirement - endpoint works without it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Test MINIMAX_REGION env var loading - Test default value of "global" when not set - Test lowercase normalization Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add ZAI_REGION config option (global | cn) to select Z.ai API endpoint. When ZAI_REGION=cn, use https://open.bigmodel.cn/api instead of https://api.z.ai/api. Mirrors the MiniMax region selection pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
prakersh
approved these changes
Mar 24, 2026
Contributor
|
Thanks @jinquan-shi Clean implementation - follows existing config patterns nicely, domains check out, and tests cover the key cases. Merging this in. |
prakersh
added a commit
that referenced
this pull request
Mar 24, 2026
Add ZAI_REGION env var documentation to both env var tables in README, matching the MINIMAX_REGION entries added in PR #41.
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.
This pull request adds support for configuring the MiniMax provider's region via a new
MINIMAX_REGIONenvironment variable. This allows users to select between the global and China (cn) endpoints, withglobalas the default. The changes include updates to documentation, configuration loading, the main application logic, and new tests to ensure correct behavior.MiniMax Region Configuration:
MINIMAX_REGIONas an optional environment variable to select the MiniMax API region (globalorcn, defaulting toglobal). The configuration is normalized to lowercase and defaults toglobalif unset. [1] [2]main.goto use the appropriate MiniMax API base URL based on the configured region, and improved logging to indicate the selected region.Documentation Updates:
README.mdanddocs/MINIMAX_SETUP.mdto document the newMINIMAX_REGIONvariable, its usage, and default behavior.Testing:
MINIMAX_REGIONis loaded from the environment, defaults toglobalif unset, and is normalized to lowercase.