Skip to content

feat(harness): add MiniMax provider to standalone Python LLM helper - #59

Open
octo-patch wants to merge 1 commit into
codejunkie99:masterfrom
octo-patch:octo/20260729-provider-add-recvq7EWFnMApY
Open

feat(harness): add MiniMax provider to standalone Python LLM helper#59
octo-patch wants to merge 1 commit into
codejunkie99:masterfrom
octo-patch:octo/20260729-provider-add-recvq7EWFnMApY

Conversation

@octo-patch

@octo-patch octo-patch commented Jul 29, 2026

Copy link
Copy Markdown

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 a minimax provider branch to llm_available() and call_model(). MiniMax is wired through its OpenAI- and Anthropic-compatible endpoints, so no new SDK dependency is required.
    • MINIMAX_REGIONS configures the global (api.minimax.io) and CN (api.minimaxi.com) regional endpoints with both openai_base_url and anthropic_base_url.
    • MINIMAX_MODELS registers the current MiniMax-M3 (1,000,000-token context window) and MiniMax-M2.7 (204,800-token context window) text models; MiniMax-M3 is the default.
    • Region is selected via AGENT_MINIMAX_REGION (default global_en); wire format via AGENT_MINIMAX_WIRE (openai default, or anthropic); API key via MINIMAX_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.
  • Full suite: the new tests pass; pre-existing tests/test_mission_control.py failures are unrelated (a SyntaxError in harness_manager/mission_control_render.py on Python 3.10) and are not touched by this diff.

Note

Add MiniMax provider to standalone Python LLM helper

  • Adds a minimax provider branch to llm.py, supporting two wire protocols: OpenAI-compatible and Anthropic-compatible, selected via AGENT_MINIMAX_WIRE (default: openai).
  • Adds region routing via AGENT_MINIMAX_REGION (global_en or cn_zh), each mapping to distinct base URLs for both wire protocols.
  • Supports two models (MiniMax-M3 with 1M context, MiniMax-M2.7 with 204K context), defaulting to MiniMax-M3 via AGENT_MODEL.
  • Documents the new env vars in .env.example and README.md; adds full test coverage in test_llm_provider.py.
  • Raises ValueError on unknown region, model, or wire protocol, failing fast on misconfiguration.

Macroscope summarized e1afa01.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant