Add MiniMax external LLM API provider and model paths - #14
Open
octo-patch wants to merge 1 commit into
Open
Conversation
Owner
|
Thanks for the PR! Before I can merge this, could you run the updated code with valid API credentials and post the output here? I can't easily verify it locally since it requires API keys. Even a short terminal log or screenshot showing the feature working would be enough. |
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: The agent library exposed an executable external LLM API tool but had no MiniMax provider or MiniMax-M3 / MiniMax-M2.7 model path.
What changed
minimax_api(prompt, history, ...)inapi.py, a new executable LLM backend that mirrors the existingmistral_apitool signature so it drops directly into anAgenttoolchain ("responses, history = minimax_api(prompt, history)").choices[0].message.contentresponse.api_model(MiniMax-M3as the default,MiniMax-M2.7also selectable), tracked in aMINIMAX_MODELSconstant.region(global_en->https://api.minimax.io/v1,cn_zh->https://api.minimaxi.com/v1) inMINIMAX_BASE_URLS.MINIMAX_API_KEYenvironment variable; multi-turn state is threaded throughhistoryjust like the existing backend.minimax_apiintophi_3_vision_mlx.pyso the toolchain parser (which resolves tool names in that module namespace) can reference it.examples.pycovering both the default model and explicit model selection.Uses the already-declared
requestsdependency; no new dependencies were added.Checks
python3 -m py_compile api.py examples.pyminimax_apiwith a stubbed HTTP layer: verified endpoint selection per region, model routing for both models, multi-turn history accumulation, and response parsing (all assertions passed).Note: the full MLX test suite (
test.py) targets Apple silicon /mlxand downloads models, so it was not run in this environment.