Repository navigation
Conversation
Adds MiniMax as two first-class chat providers in `conf/model_providers.yaml`: - `minimax` → https://api.minimax.io/v1 (international) - `minimax-cn` → https://api.minimaxi.com/v1 (China domestic) Both use the OpenAI-compatible litellm provider with `api_base` override (same pattern as `a0_venice`, `nebius`, `ollama_cloud`, etc. in the same file). `models_list.endpoint_url` is set so the Model Configuration plugin can list available models dynamically. Adds a small temperature clamp in `models.py:_adjust_call_args` because MiniMax's API rejects `temperature <= 0` and `> 1` with HTTP 400. Without the clamp, callers passing the LiteLLM/OpenAI default of 0 (deterministic mode) would hit a confusing error. The clamp fires when: - the resolved provider name is `minimax` or `minimax-cn`, OR - the api_base URL contains "minimax" (covers users who set up MiniMax via the generic "openai" provider with custom api_base), OR - the model name contains "minimax" (extra safety) Adds `tests/test_minimax_provider.py` with 10 tests covering YAML registration of both providers and the temperature clamp's positive + negative cases. Recommended models: `MiniMax-M2.7`, `MiniMax-M2.7-highspeed`.
# Conflicts: # conf/model_providers.yaml
|
Hi! Friendly ping on this one — is there anything I can do to help move the review along? Happy to rebase, add tests, or clarify any of the changes if useful. Thanks for your time! 🙏 |
|
Hi @kapelame, sorry for letting this PR age so much, we started reviewing all the old PRs to the Core. I already left a similar comment in a different PR meant for Minimax as well, but I'll leave it here as well. Can you please use the a0-create-plugin skill inside Agent Zero (you can point to it with another harness, I've created many plugins with Codex, for example, you're not forced to create it with Agent Zero itself) to create a plugin for this provider? We are now accepting new providers only as community plugins. You can learn more here: https://github.com/agent0ai/a0-plugins If you're not interested in this anymore, let me know, I'll be happy to create the plugin myself. Thanks for the contribution! |
Summary
Adds MiniMax as two first-class chat providers:
minimax→https://api.minimax.io/v1(international)minimax-cn→https://api.minimaxi.com/v1(China domestic)Both use the OpenAI-compatible litellm provider with
api_baseoverride — same pattern asa0_venice,nebius, andollama_cloudalready in the file.models_list.endpoint_urlis set so the Model Configuration plugin can list available models dynamically.Why two entries
MiniMax ships separate global (
api.minimax.io) and China (api.minimaxi.com) endpoints with separate accounts and API keys — users on one side don't have credentials for the other. Two entries lets each user pick the one they signed up for without manually editingapi_base.Temperature clamp
MiniMax's API rejects
temperature <= 0and> 1with HTTP 400. Without a clamp, callers passing the LiteLLM/OpenAI default of0(deterministic mode) hit a confusing error from the upstream API. Added a small clamp inmodels.py:_adjust_call_argsthat fires when:minimaxorminimax-cn, ORapi_baseURL containsminimax(catches users who set up MiniMax via the genericopenaiprovider + customapi_base), ORminimax(extra safety net)In-range values (
0 < temp <= 1) are passed through unchanged.Tests
tests/test_minimax_provider.pyadds 10 tests:api_basein the YAMLAll 10 pass locally with the pinned
requirements.txtenv.Recommended models
MiniMax-M2.7(latest flagship) andMiniMax-M2.7-highspeed(lower-latency variant). Users select the provider in Settings, then enter the model name.Notes
A previous bot-generated PR (#1275) added the global
minimaxprovider only and went stale (now has merge conflicts, no maintainer review). This PR supersedes it: covers both regions, includes the temp-clamp safety, and the test file uses the same minimal-stubbing style astests/test_model_config_api_keys.py.