feat(harness): add MiniMax provider to standalone Python LLM helper - #59
Open
octo-patch wants to merge 1 commit into
Open
feat(harness): add MiniMax provider to standalone Python LLM helper#59octo-patch wants to merge 1 commit into
octo-patch wants to merge 1 commit into
Conversation
Add a MiniMax provider branch to .agent/harness/llm.py so the portable harness can call MiniMax directly via its OpenAI- and Anthropic-compatible endpoints instead of relying on undocumented external SDK behavior. - Configure global (api.minimax.io) and CN (api.minimaxi.com) regional endpoints with both OpenAI and Anthropic base URLs. - Register current MiniMax-M3 (1,000,000-token context) and MiniMax-M2.7 (204,800-token context) text models; MiniMax-M3 is the default. - Select region via AGENT_MINIMAX_REGION and wire via AGENT_MINIMAX_WIRE. - Document the new env vars in .env.example and the standalone-python adapter README. - Add tests/test_llm_provider.py covering region/model config, provider availability, and both OpenAI/Anthropic wires for each region.
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: Add MiniMax provider configuration to the standalone Python LLM helper so the portable harness can call MiniMax directly.
Changes
.agent/harness/llm.py: add aminimaxprovider branch tollm_available()andcall_model(). MiniMax is wired through its OpenAI- and Anthropic-compatible endpoints, so no new SDK dependency is required.MINIMAX_REGIONSconfigures the global (api.minimax.io) and CN (api.minimaxi.com) regional endpoints with bothopenai_base_urlandanthropic_base_url.MINIMAX_MODELSregisters the currentMiniMax-M3(1,000,000-token context window) andMiniMax-M2.7(204,800-token context window) text models;MiniMax-M3is the default.AGENT_MINIMAX_REGION(defaultglobal_en); wire format viaAGENT_MINIMAX_WIRE(openaidefault, oranthropic); API key viaMINIMAX_API_KEY..env.example: document the MiniMax environment variables.adapters/standalone-python/README.md: add MiniMax to the "Choose a provider" section.tests/test_llm_provider.py: add tests covering region/model config, provider availability, and the OpenAI and Anthropic wires for each region, plus error paths for unknown region/model/wire.Checks
python3 -m pytest tests/test_llm_provider.py -q-> 8 passed.tests/test_mission_control.pyfailures are unrelated (aSyntaxErrorinharness_manager/mission_control_render.pyon Python 3.10) and are not touched by this diff.Note
Add MiniMax provider to standalone Python LLM helper
minimaxprovider branch tollm.py, supporting two wire protocols: OpenAI-compatible and Anthropic-compatible, selected viaAGENT_MINIMAX_WIRE(default:openai).AGENT_MINIMAX_REGION(global_enorcn_zh), each mapping to distinct base URLs for both wire protocols.MiniMax-M3with 1M context,MiniMax-M2.7with 204K context), defaulting toMiniMax-M3viaAGENT_MODEL..env.exampleandREADME.md; adds full test coverage intest_llm_provider.py.ValueErroron unknown region, model, or wire protocol, failing fast on misconfiguration.Macroscope summarized e1afa01.