Bug Description
get_text_auxiliary_client('triage_specifier') (and other auxiliary tasks) returns (None, None) for minimax-oauth users because oauth_minimax auth type was missing from the OAuth routing branch in resolve_provider_client().
When minimax-oauth main provider is used, kanban specify fails with Specify failed: no auxiliary client configured because the auxiliary auto-detect chain skips minimax-oauth entirely.
Root Cause
In agent/auxiliary_client.py, resolve_provider_client() dispatches on pconfig.auth_type. The OAuth branch at line 3810 had:
elif pconfig.auth_type in {"oauth_device_code", "oauth_external", "oauth_minimax"}:
But there was no if provider == 'minimax-oauth': handler block, so minimax-oauth fell through to the warning and returned (None, None).
Previous Fix Attempt
PR #35539 (closed as abandoned) attempted to fix this but used OpenAI() client wrapped in AnthropicAuxiliaryClient. Since AnthropicAuxiliaryClient calls self._client.messages.create() (Anthropic SDK interface), an OpenAI client has no messages attribute and causes AttributeError at runtime.
Fix
The correct fix adds a minimax-oauth handler in the OAuth branch that:
- Uses
anthropic.Anthropic SDK client directly (NOT OpenAI client) because MiniMax's /anthropic endpoint uses the Anthropic Messages API
- Wraps it in
AnthropicAuxiliaryClient so callers get the chat.completions.create() interface they expect
if provider == "minimax-oauth":
from hermes_cli.auth import resolve_minimax_oauth_runtime_credentials
import anthropic
creds = resolve_minimax_oauth_runtime_credentials(as_token_provider=False)
real_client = anthropic.Anthropic(
api_key=creds["api_key"],
base_url=creds["base_url"].rstrip("/"),
)
resolved_model = model or "MiniMax-M2.7"
sync_wrapper = AnthropicAuxiliaryClient(
real_client, resolved_model, creds["api_key"], creds["base_url"], is_oauth=True,
)
if async_mode:
return AsyncAnthropicAuxiliaryClient(sync_wrapper), resolved_model
return sync_wrapper, resolved_model
Affected Surfaces
kanban specify (triage_specifier auxiliary task)
kanban decompose
profile describe
goals continue/rewrite
- Any auxiliary task when minimax-oauth is the main provider
Labels
type/bug, comp/agent, provider/minimax
Bug Description
get_text_auxiliary_client('triage_specifier')(and other auxiliary tasks) returns(None, None)for minimax-oauth users becauseoauth_minimaxauth type was missing from the OAuth routing branch inresolve_provider_client().When minimax-oauth main provider is used,
kanban specifyfails withSpecify failed: no auxiliary client configuredbecause the auxiliary auto-detect chain skips minimax-oauth entirely.Root Cause
In
agent/auxiliary_client.py,resolve_provider_client()dispatches onpconfig.auth_type. The OAuth branch at line 3810 had:But there was no
if provider == 'minimax-oauth':handler block, so minimax-oauth fell through to the warning and returned(None, None).Previous Fix Attempt
PR #35539 (closed as abandoned) attempted to fix this but used
OpenAI()client wrapped inAnthropicAuxiliaryClient. SinceAnthropicAuxiliaryClientcallsself._client.messages.create()(Anthropic SDK interface), anOpenAIclient has nomessagesattribute and causesAttributeErrorat runtime.Fix
The correct fix adds a
minimax-oauthhandler in the OAuth branch that:anthropic.AnthropicSDK client directly (NOTOpenAIclient) because MiniMax's/anthropicendpoint uses the Anthropic Messages APIAnthropicAuxiliaryClientso callers get thechat.completions.create()interface they expectAffected Surfaces
kanban specify(triage_specifier auxiliary task)kanban decomposeprofile describegoalscontinue/rewriteLabels
type/bug, comp/agent, provider/minimax