Skip to content

The agent that grows with you

fix(minimax): register minimax-portal and minimax-global aliases for minimax-oauth (#107928)

Julian Cruzetd55c3ad70b0a
diff --git a/plugins/model-providers/minimax/__init__.py b/plugins/model-providers/minimax/__init__.py
index 0a71be3f836..27e1dd12dae 100644
--- a/plugins/model-providers/minimax/__init__.py
+++ b/plugins/model-providers/minimax/__init__.py
@@ -49,7 +49,7 @@ minimax_cn = MiniMaxProfile(
)
minimax_oauth = MiniMaxProfile(
- name="minimax-oauth", aliases=("minimax_oauth", "minimax-oauth-io"), api_mode="anthropic_messages",
+ name="minimax-oauth", aliases=("minimax_oauth", "minimax-portal", "minimax-global", "minimax-oauth-io"), api_mode="anthropic_messages",
display_name="MiniMax (OAuth)", description="MiniMax via OAuth browser flow — no API key required",
signup_url="https://api.minimax.io/",
env_vars=(), # OAuth — tokens in auth.json, not env
diff --git a/tests/plugins/model_providers/test_minimax_profile.py b/tests/plugins/model_providers/test_minimax_profile.py
index 0f01a821b6a..0a72f536055 100644
--- a/tests/plugins/model_providers/test_minimax_profile.py
+++ b/tests/plugins/model_providers/test_minimax_profile.py
@@ -181,3 +181,52 @@ class TestMinimaxM3OpenAIReasoningWireShape:
"reasoning_split": True,
"thinking": {"type": "adaptive"},
}
+
+
+class TestMinimaxOauthAliases:
+ """``minimax-oauth`` provider advertises every alias the docs promise.
+
+ The user-facing guide at ``website/docs/guides/minimax-oauth.md`` lists
+ four ``--provider`` aliases for ``minimax-oauth``:
+
+ - ``minimax-oauth`` (canonical)
+ - ``minimax-portal``
+ - ``minimax-global``
+ - ``minimax_oauth`` (underscore form)
+
+ The provider profile must register each one so ``hermes --provider
+ minimax-portal`` (and the global variant) actually resolve instead of
+ failing with "unknown provider". Pinning the alias set in this test keeps
+ docs and code from drifting back out of sync.
+ """
+
+ DOCUMENTED_OAUTH_ALIASES = ("minimax-oauth", "minimax_oauth", "minimax-portal", "minimax-global")
+
+ def test_minimax_oauth_registers_every_documented_alias(self):
+ import model_tools # noqa: F401
+ import providers
+
+ profile = providers.get_provider_profile("minimax-oauth")
+ assert profile is not None
+
+ registered = (profile.name, *profile.aliases)
+ for alias in self.DOCUMENTED_OAUTH_ALIASES:
+ assert alias in registered, (
+ f"docs promise '{alias}' as a resolvable provider id for "
+ "minimax-oauth, but the profile only registers "
+ f"{registered!r} — run `hermes --provider {alias}` and it "
+ "fails with 'unknown provider'"
+ )
+
+ def test_each_documented_oauth_alias_resolves_back_to_minimax_oauth(self):
+ import model_tools # noqa: F401
+ import providers
+
+ for alias in self.DOCUMENTED_OAUTH_ALIASES:
+ resolved = providers.get_provider_profile(alias)
+ assert resolved is not None, f"alias {alias!r} did not resolve"
+ assert resolved.name == "minimax-oauth", (
+ f"alias {alias!r} resolved to {resolved.name!r}, expected "
+ f"'minimax-oauth' (canonical). The alias registry is routing "
+ "to the wrong provider."
+ )