Repository navigation
Description
auxiliary_client.py: unhandled auth_type 'oauth_minimax' breaks all auxiliary tasks for minimax-oauth users
Symptom
When auxiliary.<task>.provider: minimax-oauth is set in config.yaml, every auxiliary task (compression, vision, title_generation, session_search, web_extract, approval, flush_memories, kanban_decomposer, mcp, profile_describer, skills_hub, triage_specifier, curator) returns (None, None) and the user sees:
⚠ No auxiliary LLM provider configured — context compression will drop middle turns without a summary. Run `hermes setup` or set OPENROUTER_API_KEY.
The main model.provider: minimax-oauth path keeps working — only auxiliary tasks are broken.
Root cause
agent/auxiliary_client.py::resolve_provider_client handles these auth_type values:
api_key(regular providers)aws_sdk(Bedrock)oauth_device_code(Nous, OpenAI Codex, xAI — hardcoded)oauth_external(same as above)
minimax-oauth has auth_type == "oauth_minimax" (a separate value defined in hermes_cli/auth.py:301 as "MiniMax (OAuth · minimax.io)"). The function falls through to the final logger.warning("unhandled auth_type ...") and returns (None, None).
Verified in ~/.hermes/logs/agent.log:
WARNING agent.auxiliary_client: resolve_provider_client: unhandled auth_type oauth_minimax for minimax-oauth
WARNING agent.title_generator: Title generation failed: Provider 'minimax-oauth' is set in config.yaml but no API key was found. Set the MINIMAX-OAUTH_API_KEY environment variable, or switch to a different provider with `hermes model`.
Test gap
tests/plugins/model_providers/test_minimax_profile.py::test_consumer_api_returns_non_empty_for_each_provider checks that _get_aux_model_for_provider returns a non-empty model, but does NOT exercise resolve_provider_client end-to-end. A minimal E2E test that calls resolve_provider_client("minimax-oauth") and asserts the result is not (None, None) would have caught this.
Affected versions
Hermes 0.16.0 (verified 2026-06-13 on macOS). Earlier versions may also be affected.
Suggested fix
Add an elif pconfig.auth_type == "oauth_minimax": branch in resolve_provider_client, before the final unhandled auth_type warning. Use the same build_minimax_oauth_token_provider() callable + AnthropicAuxiliaryClient pattern that's already in agent_init.py:657-660 for the main client, with pconfig.inference_base_url as base_url.
Roughly:
elif pconfig.auth_type == "oauth_minimax":
if provider != "minimax-oauth":
logger.warning("auth_type oauth_minimax but provider=%r — refusing", provider)
return None, None
try:
from hermes_cli.auth import build_minimax_oauth_token_provider
from agent.anthropic_adapter import build_anthropic_client
except ImportError as exc:
logger.warning("minimax-oauth aux: deps missing: %s", exc)
return None, None
final_model = _normalize_resolved_model(
model or _get_aux_model_for_provider("minimax-oauth"), provider,
)
base_url = (pconfig.inference_base_url or "").rstrip("/")
if not base_url:
return None, None
try:
token_provider = build_minimax_oauth_token_provider()
real_client = build_anthropic_client(token_provider, base_url)
except Exception as exc:
logger.warning("cannot build MiniMax OAuth aux client: %s", exc)
return None, None
client = AnthropicAuxiliaryClient(
real_client, final_model, api_key=token_provider,
base_url=base_url, is_oauth=True,
)
return (_to_async_client(client, final_model, is_vision=is_vision)
if async_mode else (client, final_model))Workaround
Set auxiliary.<task>.provider: auto — falls back to OpenRouter (or another detected provider). Works, but burns credits instead of using the OAuth subscription. Not aligned with the "use OAuth subscription, not API key" preference.
Notes for the reviewer
- The same OAuth + Anthropic-compat pattern is already used in three other places in the codebase:
agent_init.py:657-660,agent_runtime_helpers.py:1474-1484,credential_pool.py:1835-1844. The auxiliary-client resolver is the only place that was missed. _ANTHROPIC_COMPAT_PROVIDERSinauxiliary_client.py:4827already lists"minimax-oauth", so Anthropic-formatted image blocks are emitted correctly. The client-builder is what's missing.build_minimax_oauth_token_provider()returns a zero-arg callable that re-readsauth.jsonper request and refreshes the bearer when withinMINIMAX_OAUTH_REFRESH_SKEW_SECONDSof expiry — required because MiniMax access tokens are short-lived (~15min).
Activity
alt-glitch commentedon Jun 12, 2026
Duplicate of #21521 (same root cause:
auxiliary_client.py::resolve_provider_clienthas nooauth_minimaxbranch, so all auxiliary tasks return(None, None)for minimax-oauth users). Fix PRs: #42128, #40122. Note: #45241 is an identical twin of this report.Slaventuss commentedon Jun 13, 2026
Closing as duplicate of #21521. Same fix is being worked on in #42128 and #40122 (both still open). Local 35-line patch verified working on 0.16.0 (2026-06-13) using build_minimax_oauth_token_provider() + AnthropicAuxiliaryClient. Backup at auxiliary_client.py.bak.pre-minimax-oauth-fix-20260613_010030.
andrexibiza commentedon Aug 3, 2026
Resolved by PR #77419 — ready to close.
The
oauth_minimaxauth_type breaking all auxiliary tasks is fixed by PR #77419 (fix(auxiliary): route oauth_minimax through AnthropicAuxiliaryClient, #77419).resolve_provider_clientonly dispatchedoauth_device_code/oauth_external;oauth_minimaxfell through to(None, None), silently breaking every auxiliary task.oauth_minimaxadded to the OAuth dispatch;minimax-oauthroutes to the MiniMax Anthropic-compatible builder with a callable token provider.git diff --checkclean.Suggested action: close as resolved-by #77419.