fix(auxiliary): support minimax-oauth provider for auxiliary tasks - #42128
Open
seansteynvida wants to merge 1 commit into
Open
fix(auxiliary): support minimax-oauth provider for auxiliary tasks#42128seansteynvida wants to merge 1 commit into
seansteynvida wants to merge 1 commit into
Conversation
Auxiliary tasks (title generation, compression, session search, web extract, etc.) configured as "auto" fall back to the user's main provider/model. resolve_provider_client() special-cased nous, openai-codex, and xai-oauth for this, but minimax-oauth (auth_type "oauth_minimax") fell through to the generic "unhandled auth_type" branch and returned (None, None) — so every auxiliary task on a MiniMax OAuth account logged "No LLM provider configured" even though the user was logged in. Add _build_minimax_oauth_aux_client(), mirroring the xai-oauth helper: it resolves credentials via the existing resolve_minimax_oauth_runtime_credentials() (which handles MiniMax's short-lived access-token refresh) and wraps the client in AnthropicAuxiliaryClient, since MiniMax OAuth's inference endpoint speaks the Anthropic Messages API (api.minimax.io/anthropic — already recognized in _ANTHROPIC_COMPAT_PROVIDERS). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
tonydwb
approved these changes
Jun 9, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Looks Good
- Fixes minimax-oauth provider support for auxiliary tasks: properly builds the auxiliary client with OAuth-enabled credentials when
is_oauth=True. - No security concerns, no debug artifacts.
Reviewed by Hermes Agent
teknium1
reviewed
Jul 14, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for isolating the missing MiniMax OAuth auxiliary route. The premise remains valid on current main: hermes_cli/auth.py:301-306 declares oauth_minimax, while agent/auxiliary_client.py:5106-5129 does not handle that auth type.
Problems
agent/auxiliary_client.py:1951callsresolve_minimax_oauth_runtime_credentials()withoutas_token_provider=True, and:1955coerces the result tostr. Currenthermes_cli/auth.py:7779-7800documents that a static MiniMax token expires after about 15 minutes; the callable provider is required to refresh per request.- The PR adds no regression tests. The adjacent OAuth fallback patterns are tested in
tests/agent/test_auxiliary_client.py:734-880.
Suggested changes
- Port the branch onto the current router and preserve
resolve_minimax_oauth_runtime_credentials(as_token_provider=True)'s callable throughbuild_anthropic_client; callable credentials are supported atagent/anthropic_adapter.py:713-751. - Add mocked resolver tests for MiniMax OAuth, including empty-model fallback and the refreshable token-provider path.
This is an automated hermes-sweeper review.
| from hermes_cli.auth import resolve_minimax_oauth_runtime_credentials | ||
| from agent.anthropic_adapter import build_anthropic_client | ||
|
|
||
| creds = resolve_minimax_oauth_runtime_credentials() |
Contributor
There was a problem hiding this comment.
Use as_token_provider=True here and preserve the returned callable rather than coercing it to str below. Current hermes_cli/auth.py:7779-7800 documents that MiniMax access tokens expire after about 15 minutes; build_anthropic_client accepts a callable and refreshes authorization per request.
Open
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
autoare supposed to fall back to the user's main provider/model, butresolve_provider_client()only special-casednous,openai-codex, andxai-oauthfor OAuth providers.minimax-oauth(auth_typeoauth_minimax) fell through to the generic "unhandled auth_type" branch and returned(None, None), so every auxiliary task on a MiniMax OAuth account loggedNo LLM provider configured for task=...even though the user was logged in and the main chat session worked fine._build_minimax_oauth_aux_client(), mirroring the existingxai-oauthhelper: it resolves credentials viaresolve_minimax_oauth_runtime_credentials()(which already handles MiniMax's short-lived access-token refresh) and wraps the client inAnthropicAuxiliaryClient, since MiniMax OAuth's inference endpoint speaks the Anthropic Messages API (api.minimax.io/anthropic— already recognized in_ANTHROPIC_COMPAT_PROVIDERS).provider == "minimax-oauth"branch intoresolve_provider_client()alongside the existingxai-oauthbranch.Test plan
python3 -m astsyntax check on the modified modulemodel.provider: minimax-oauthandauxiliary.title_generation.provider: auto, confirm title generation no longer logsNo LLM provider configured for task=title_generationand produces a session title via the MiniMax OAuth session