Skip to content

fix: use main provider model for auxiliary tasks on non-aggregator providers#5091

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-eba4b946
Apr 4, 2026
Merged

fix: use main provider model for auxiliary tasks on non-aggregator providers#5091
teknium1 merged 1 commit into
mainfrom
hermes/hermes-eba4b946

Conversation

@teknium1

@teknium1 teknium1 commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Users on direct API-key providers (Alibaba, DeepSeek, ZAI, etc.) without an OpenRouter or Nous key get broken auxiliary tasks (compression, vision, web_extract, etc.) because _resolve_auto() only tried aggregator providers first, then fell back to iterating PROVIDER_REGISTRY with wrong default model names.

Reported by SkyLinx — Alibaba Coding Plan user getting 400 errors: model google/gemini-3-flash-preview is not supported sent to DashScope.

Changes

agent/auxiliary_client.py:

  • Added _read_main_provider() — reads model.provider from config.yaml
  • Rewrote _resolve_auto() — when main provider is NOT an aggregator (OpenRouter/Nous), uses main provider + main model as the first choice for all auxiliary tasks
  • Aggregator users still get cheap gemini-flash for side tasks (no behavior change)

Test plan

  • E2E verified: Alibaba user → gets glm-5 on DashScope ✓
  • E2E verified: OpenRouter user → still gets gemini-3-flash-preview
  • E2E verified: DeepSeek user → gets deepseek-chat on DeepSeek ✓
  • 582 agent/provider tests passed, 2293 tool/CLI tests passed

…oviders

Users on direct API-key providers (Alibaba, DeepSeek, ZAI, etc.) without
an OpenRouter or Nous key would get broken auxiliary tasks (compression,
vision, etc.) because _resolve_auto() only tried aggregator providers
first, then fell back to iterating PROVIDER_REGISTRY with wrong default
model names.

Now _resolve_auto() checks the user's main provider first. If it's not
an aggregator (OpenRouter/Nous), it uses their main model directly for
all auxiliary tasks. Aggregator users still get the cheap gemini-flash
model as before.

Adds _read_main_provider() to read model.provider from config.yaml,
mirroring the existing _read_main_model().

Reported by SkyLinx — Alibaba Coding Plan user getting 400 errors from
google/gemini-3-flash-preview being sent to DashScope.
@teknium1 teknium1 merged commit 93aa01c into main Apr 4, 2026
3 of 4 checks passed
naoironman-hue pushed a commit to naoironman-hue/hermes-agent that referenced this pull request Apr 5, 2026
…oviders (NousResearch#5091)

Users on direct API-key providers (Alibaba, DeepSeek, ZAI, etc.) without
an OpenRouter or Nous key would get broken auxiliary tasks (compression,
vision, etc.) because _resolve_auto() only tried aggregator providers
first, then fell back to iterating PROVIDER_REGISTRY with wrong default
model names.

Now _resolve_auto() checks the user's main provider first. If it's not
an aggregator (OpenRouter/Nous), it uses their main model directly for
all auxiliary tasks. Aggregator users still get the cheap gemini-flash
model as before.

Adds _read_main_provider() to read model.provider from config.yaml,
mirroring the existing _read_main_model().

Reported by SkyLinx — Alibaba Coding Plan user getting 400 errors from
google/gemini-3-flash-preview being sent to DashScope.
lightx added a commit to lightx/hermes-agent that referenced this pull request Apr 5, 2026
…s-obsidian toolset

Merges 33 upstream commits while preserving local NixOS compatibility fixes:
- agent/auxiliary_client.py: deferred imports for get_hermes_home() and _AUTH_JSON_PATH
- agent/credential_pool.py: __getattr__ lazy-loading for hermes_cli.auth imports
- hermes_cli/config.py: lazy-load tool_backend_helpers to break circular deps

Adds hermes-obsidian toolset for Obsidian vault semantic search via ChromaDB.

Upstream highlights:
- fix: use main provider model for auxiliary tasks on non-aggregator providers (NousResearch#5091)
- feat: /model command — models.dev primary database + --provider flag (NousResearch#5181)
- feat(gateway): live-stream /update output + interactive prompt buttons (NousResearch#5180)
- fix(telegram): prevent duplicate message delivery on send timeout (NousResearch#5153)
- 54 new web design templates in popular-web-designs skill
- gitnexus-explorer skill for GitHub/GitLab reconnaissance
Mibayy added a commit to Mibayy/hermes-agent that referenced this pull request Apr 6, 2026
…sResearch#5091 follow-up)

PR NousResearch#5091 fixed _resolve_auto() so that users on non-aggregator providers
(Alibaba, DeepSeek, ZAI, Gemini Direct, etc.) have their main provider
used for auxiliary tasks instead of silently failing.

However, resolve_vision_provider_client() has its own "auto" routing
path that was NOT updated. It only checks _VISION_AUTO_PROVIDER_ORDER
(openrouter, nous, openai-codex, anthropic, custom) and promotes the
main provider only when it already belongs to that list — so non-aggregator
providers were skipped entirely, causing the vision tool to always fail
for those users ("vision tool keep failing").

Fix: mirror the same non-aggregator check that _resolve_auto() received
in NousResearch#5091, inserted before the _VISION_AUTO_PROVIDER_ORDER loop in the
"auto" branch of resolve_vision_provider_client(). If the user's main
provider is not an aggregator and not already in _VISION_AUTO_PROVIDER_ORDER,
we attempt it via resolve_provider_client() first.

Closes NousResearch#5366

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tommyeds pushed a commit to Tommyeds/hermes-agent that referenced this pull request Apr 12, 2026
…oviders (NousResearch#5091)

Users on direct API-key providers (Alibaba, DeepSeek, ZAI, etc.) without
an OpenRouter or Nous key would get broken auxiliary tasks (compression,
vision, etc.) because _resolve_auto() only tried aggregator providers
first, then fell back to iterating PROVIDER_REGISTRY with wrong default
model names.

Now _resolve_auto() checks the user's main provider first. If it's not
an aggregator (OpenRouter/Nous), it uses their main model directly for
all auxiliary tasks. Aggregator users still get the cheap gemini-flash
model as before.

Adds _read_main_provider() to read model.provider from config.yaml,
mirroring the existing _read_main_model().

Reported by SkyLinx — Alibaba Coding Plan user getting 400 errors from
google/gemini-3-flash-preview being sent to DashScope.
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
…oviders (NousResearch#5091)

Users on direct API-key providers (Alibaba, DeepSeek, ZAI, etc.) without
an OpenRouter or Nous key would get broken auxiliary tasks (compression,
vision, etc.) because _resolve_auto() only tried aggregator providers
first, then fell back to iterating PROVIDER_REGISTRY with wrong default
model names.

Now _resolve_auto() checks the user's main provider first. If it's not
an aggregator (OpenRouter/Nous), it uses their main model directly for
all auxiliary tasks. Aggregator users still get the cheap gemini-flash
model as before.

Adds _read_main_provider() to read model.provider from config.yaml,
mirroring the existing _read_main_model().

Reported by SkyLinx — Alibaba Coding Plan user getting 400 errors from
google/gemini-3-flash-preview being sent to DashScope.
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…oviders (NousResearch#5091)

Users on direct API-key providers (Alibaba, DeepSeek, ZAI, etc.) without
an OpenRouter or Nous key would get broken auxiliary tasks (compression,
vision, etc.) because _resolve_auto() only tried aggregator providers
first, then fell back to iterating PROVIDER_REGISTRY with wrong default
model names.

Now _resolve_auto() checks the user's main provider first. If it's not
an aggregator (OpenRouter/Nous), it uses their main model directly for
all auxiliary tasks. Aggregator users still get the cheap gemini-flash
model as before.

Adds _read_main_provider() to read model.provider from config.yaml,
mirroring the existing _read_main_model().

Reported by SkyLinx — Alibaba Coding Plan user getting 400 errors from
google/gemini-3-flash-preview being sent to DashScope.
olympus-terminal pushed a commit to olympus-terminal/hermes-agent that referenced this pull request May 16, 2026
…oviders (NousResearch#5091)

Users on direct API-key providers (Alibaba, DeepSeek, ZAI, etc.) without
an OpenRouter or Nous key would get broken auxiliary tasks (compression,
vision, etc.) because _resolve_auto() only tried aggregator providers
first, then fell back to iterating PROVIDER_REGISTRY with wrong default
model names.

Now _resolve_auto() checks the user's main provider first. If it's not
an aggregator (OpenRouter/Nous), it uses their main model directly for
all auxiliary tasks. Aggregator users still get the cheap gemini-flash
model as before.

Adds _read_main_provider() to read model.provider from config.yaml,
mirroring the existing _read_main_model().

Reported by SkyLinx — Alibaba Coding Plan user getting 400 errors from
google/gemini-3-flash-preview being sent to DashScope.
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…oviders (NousResearch#5091)

Users on direct API-key providers (Alibaba, DeepSeek, ZAI, etc.) without
an OpenRouter or Nous key would get broken auxiliary tasks (compression,
vision, etc.) because _resolve_auto() only tried aggregator providers
first, then fell back to iterating PROVIDER_REGISTRY with wrong default
model names.

Now _resolve_auto() checks the user's main provider first. If it's not
an aggregator (OpenRouter/Nous), it uses their main model directly for
all auxiliary tasks. Aggregator users still get the cheap gemini-flash
model as before.

Adds _read_main_provider() to read model.provider from config.yaml,
mirroring the existing _read_main_model().

Reported by SkyLinx — Alibaba Coding Plan user getting 400 errors from
google/gemini-3-flash-preview being sent to DashScope.
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…oviders (NousResearch#5091)

Users on direct API-key providers (Alibaba, DeepSeek, ZAI, etc.) without
an OpenRouter or Nous key would get broken auxiliary tasks (compression,
vision, etc.) because _resolve_auto() only tried aggregator providers
first, then fell back to iterating PROVIDER_REGISTRY with wrong default
model names.

Now _resolve_auto() checks the user's main provider first. If it's not
an aggregator (OpenRouter/Nous), it uses their main model directly for
all auxiliary tasks. Aggregator users still get the cheap gemini-flash
model as before.

Adds _read_main_provider() to read model.provider from config.yaml,
mirroring the existing _read_main_model().

Reported by SkyLinx — Alibaba Coding Plan user getting 400 errors from
google/gemini-3-flash-preview being sent to DashScope.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant