hermes - ✅(Solved) Fix `auxiliary.vision.provider: auto` causes HTTP 404 with minimax-cn base_url inheritance [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#20514Fetched 2026-05-07 03:57:38
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Participants
Timeline (top)
labeled ×4closed ×1commented ×1cross-referenced ×1

Error Message

Auxiliary title generation failed: HTTP 404: 404 page not found

Root Cause

In agent/auxiliary_client.py, when provider=auto, the code inherits the main model's base_url (https://api.minimaxi.com/anthropic). However, the auxiliary client uses the OpenAI SDK and calls /v1/chat/completions, resulting in the wrong path:

  • Expected: https://api.minimaxi.com/anthropic/v1/chat/completions
  • Actual: https://api.minimaxi.com/v1/chat/completions (missing /anthropic)

The function _to_openai_base_url() exists to convert /anthropic suffix to /v1 for OpenAI-compatible calls, but it is not applied in the auto provider path when inheriting the main model's base_url.

Fix Action

Fixed

PR fix notes

PR #20554: fix(agent): rewrite /anthropic base URL for OpenAI fallback in custom endpoint

Description (problem / solution / changelog)

Pre-apply _to_openai_base_url() to the OpenAI client constructed in _try_custom_endpoint() so /anthropic-suffixed endpoints don't 404 when the Anthropic SDK wrap doesn't take.

What changed and why

  • agent/auxiliary_client.py: in _try_custom_endpoint(), build the OpenAI client with _to_openai_base_url(_clean_base) instead of the raw _clean_base. For URLs like https://api.minimaxi.com/anthropic this yields https://api.minimaxi.com/v1. AnthropicAuxiliaryClient still receives the original custom_base and routes through the Anthropic SDK against /anthropic, so the wrapped happy path is unchanged. The fix prevents auxiliary tasks (title generation, vision auto, compression, etc.) from hitting /anthropic/chat/completions and 404ing whenever _maybe_wrap_anthropic() returns the unwrapped OpenAI client (e.g. anthropic SDK import failed, build_anthropic_client raised, or URL-based detection didn't fire).
  • tests/agent/test_auxiliary_client_anthropic_custom.py: extended the SDK-missing fallback test to assert the OpenAI client base URL ends in /v1 (not /anthropic); added two new tests covering the no-api-mode /anthropic URL path and the codex_responses mode rewrite.

How to test

  • pytest tests/agent/test_auxiliary_client_anthropic_custom.py -v — 5 tests pass, including 3 new assertions on the rewritten base URL.
  • pytest tests/agent/test_auxiliary_client.py tests/agent/test_minimax_provider.py tests/agent/test_minimax_auxiliary_url.py tests/agent/test_auxiliary_client_anthropic_custom.py -q — 190 tests pass.
  • pytest tests/run_agent/test_provider_parity.py -k 'minimax or anthropic or custom' -q — 5 tests pass.

What platforms tested on

  • macOS on darwin-arm64 (local)

Fixes #20514

<!-- autocontrib:worker-id=issue-new-bb8c2c56 kind=pr-open -->

Changed files

  • agent/auxiliary_client.py (modified, +9/-3)
  • tests/agent/test_auxiliary_client_anthropic_custom.py (modified, +53/-0)

Code Example

model:
  base_url: https://api.minimaxi.com/anthropic
  provider: minimax-cn

auxiliary:
  title_generation:
    provider: auto   # ⟴ fails
    # provider: minimax-cn   # ⟴ works
RAW_BUFFERClick to expand / collapse

Bug Description

When auxiliary.*.provider is set to auto and the main model uses minimax-cn provider with base_url https://api.minimaxi.com/anthropic, auxiliary tasks (e.g. title generation) fail with HTTP 404.

  • Hermes Agent Version: v0.11.0 (2026.4.23)
  • Python: 3.11.15
  • OpenAI SDK: 2.31.0
  • Installation: WSL on Windows
  • Platform: GitHub Actions ( NousResearch/hermes-agent )

Root Cause

In agent/auxiliary_client.py, when provider=auto, the code inherits the main model's base_url (https://api.minimaxi.com/anthropic). However, the auxiliary client uses the OpenAI SDK and calls /v1/chat/completions, resulting in the wrong path:

  • Expected: https://api.minimaxi.com/anthropic/v1/chat/completions
  • Actual: https://api.minimaxi.com/v1/chat/completions (missing /anthropic)

The function _to_openai_base_url() exists to convert /anthropic suffix to /v1 for OpenAI-compatible calls, but it is not applied in the auto provider path when inheriting the main model's base_url.

Configuration

model:
  base_url: https://api.minimaxi.com/anthropic
  provider: minimax-cn

auxiliary:
  title_generation:
    provider: auto   # ⟴ fails
    # provider: minimax-cn   # ⟴ works

Expected Behavior

Either:

  1. auto mode should correctly apply _to_openai_base_url() when inheriting base_url from the main model, OR
  2. Document that minimax-cn users should explicitly set auxiliary provider to minimax-cn instead of auto

Logs

Auxiliary title generation failed: HTTP 404: 404 page not found

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING