Skip to content

feat: route MiniMax through the Anthropic-compatible endpoint and add test coverage - #107

Open
octo-patch wants to merge 1 commit into
1rgs:mainfrom
octo-patch:octo/20260804-parameter-refresh-recvre8NyRDU8Z
Open

feat: route MiniMax through the Anthropic-compatible endpoint and add test coverage#107
octo-patch wants to merge 1 commit into
1rgs:mainfrom
octo-patch:octo/20260804-parameter-refresh-recvre8NyRDU8Z

Conversation

@octo-patch

Copy link
Copy Markdown

Reason: Refresh the MiniMax integration to cover the Anthropic-compatible endpoints and add MiniMax test coverage.

What changed

  • server.py: MiniMax models (minimax/ prefix) are now routed through LiteLLM's anthropic/ provider to the MiniMax Anthropic-compatible endpoint (https://api.minimax.io/anthropic, China region https://api.minimaxi.com/anthropic), matching the target endpoint configuration. The OpenAI-compatible endpoint remains available via MINIMAX_API_STYLE=openai with MINIMAX_BASE_URL (https://api.minimax.io/v1 / https://api.minimaxi.com/v1).
  • Added MINIMAX_API_KEY, MINIMAX_BASE_URL, MINIMAX_ANTHROPIC_BASE_URL, and MINIMAX_API_STYLE configuration.
  • Added MINIMAX_MODELS = ["MiniMax-M3", "MiniMax-M2.7"] with model prefixing for bare MiniMax model names, and PREFERRED_PROVIDER=minimax support for haiku/sonnet mapping.
  • Thinking blocks are forwarded for MiniMax models routed through the Anthropic-compatible endpoint.
  • tests.py: Added a proxy-only MiniMax scenario (minimax/MiniMax-M3) with a test_proxy_only harness function that validates the Anthropic-format response structure directly, since there is no native Anthropic equivalent to compare against.
  • .env.example / README.md: Documented the new MiniMax configuration.

Checks run

  • python3 -m py_compile server.py tests.py
  • python3 tests.py --help
  • Exercised the model-mapping and conversion logic against a minimal LiteLLM stub (prefixing, minimax/ -> anthropic/ routing, thinking forwarding, base-URL selection).

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