Skip to content

fix: handle minimax oauth fallback routing#27640

Closed
shivros wants to merge 1 commit into
NousResearch:mainfrom
shivros:fix/minimax-oauth-fallback-routing
Closed

fix: handle minimax oauth fallback routing#27640
shivros wants to merge 1 commit into
NousResearch:mainfrom
shivros:fix/minimax-oauth-fallback-routing

Conversation

@shivros

@shivros shivros commented May 17, 2026

Copy link
Copy Markdown

Summary

Add dedicated MiniMax OAuth handling in the auxiliary client resolver, matching the established xai-oauth pattern.

New helpers (in agent/auxiliary_client.py):

  • _resolve_minimax_oauth_for_aux() — pool-aware credential resolution, falling back to the auth-store singleton
  • _build_minimax_oauth_aux_client(model) — builds an AnthropicAuxiliaryClient via build_anthropic_client
  • _build_anthropic_real_client(api_key, base_url) — thin wrapper around the Anthropic adapter import

The inline branch in resolve_provider_client() shrinks to the standard ~8-line pattern used by xai-oauth and other OAuth providers.

Problem

minimax-oauth uses auth_type: oauth_minimax, which is not covered by the generic oauth_device_code / oauth_external arm. Without a dedicated branch, the resolver logged unhandled auth_type oauth_minimax and skipped MiniMax entirely, falling through to the next backup provider.

Test Plan

  • python -m pytest -q tests/agent/test_auxiliary_client.py -k minimax_oauth — 2 passed
  • Full auxiliary-client suite — 161 passed

@alt-glitch alt-glitch added type/bug Something isn't working comp/agent Core agent loop, run_agent.py, prompt builder provider/minimax MiniMax (Anthropic transport) P3 Low — cosmetic, nice to have labels May 17, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #22213 (and #25287) — all three PRs add the same oauth_minimax handling to resolve_provider_client() in auxiliary_client.py, fixing #21521.

Extract MiniMax OAuth resolution into dedicated helpers matching the
established xai-oauth pattern (_resolve_*_for_aux + _build_*_aux_client).

The generic oauth_device_code / oauth_external arm does not cover
oauth_minimax, so resolve_provider_client() silently skipped the MiniMax
backup and fell through to the next provider.  The new dedicated branch
resolves credentials (pool-aware), builds an Anthropic-wire client, and
wraps it in AnthropicAuxiliaryClient.
@shivros shivros force-pushed the fix/minimax-oauth-fallback-routing branch from b5005b6 to 7bef395 Compare May 17, 2026 22:51
@shivros

shivros commented May 18, 2026

Copy link
Copy Markdown
Author

Closing in favor of #22213 and #25287 — this is a duplicate per @alt-glitch's note. Happy to contribute the pool-aware credential resolution pattern from this PR to whichever one lands. Thanks for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder P3 Low — cosmetic, nice to have provider/minimax MiniMax (Anthropic transport) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants