hermes - ✅(Solved) Fix Auxiliary provider=main should inherit the live session model for compression [1 pull requests, 1 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#14306Fetched 2026-04-23 07:45:42
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×3cross-referenced ×1

When an auxiliary task is configured with provider: main and no explicit auxiliary model, Hermes resolves the provider correctly but does not inherit the live session model. Instead, it falls through to the provider's baked-in auxiliary default (for Codex this is gpt-5.2-codex).

This makes session compression pick the wrong model by default and can trigger bogus threshold auto-lowering warnings even though the active agent model already has the needed context window.

Root Cause

main_runtime is available to callers like compression, but _resolve_task_provider_model() does not accept or use it. So provider resolution can follow main, while model resolution still falls through to provider defaults.

Fix Action

Fixed

PR fix notes

PR #14308: fix(auxiliary): inherit live session model for provider=main compression

Description (problem / solution / changelog)

Summary

  • make auxiliary provider: main inherit the live session model when no explicit task model is set
  • thread main_runtime into auxiliary task resolution
  • add regression tests for resolution precedence and main_runtime forwarding

Problem

With config like:

auxiliary:
  compression:
    provider: main
    model: ''

Hermes resolved the provider correctly but still fell through to provider-specific auxiliary defaults for the model. For Codex, that meant gpt-5.2-codex instead of the active session model, which produced misleading compression threshold auto-lowering warnings.

Fix

  • get_text_auxiliary_client() and get_async_text_auxiliary_client() now pass main_runtime into _resolve_task_provider_model()
  • call_llm() now does the same for sync calls
  • _resolve_task_provider_model() now inherits main_runtime['model'] when:
    • no explicit task model is set, and
    • requested provider is main

Tests

  • added regression tests in tests/agent/test_auxiliary_client.py
  • local run: pytest -q tests/agent/test_auxiliary_client.py

Closes #14306

Changed files

  • agent/auxiliary_client.py (modified, +15/-3)
  • tests/agent/test_auxiliary_client.py (modified, +73/-0)

Code Example

auxiliary:
  compression:
    provider: main
    model: ''
RAW_BUFFERClick to expand / collapse

Summary

When an auxiliary task is configured with provider: main and no explicit auxiliary model, Hermes resolves the provider correctly but does not inherit the live session model. Instead, it falls through to the provider's baked-in auxiliary default (for Codex this is gpt-5.2-codex).

This makes session compression pick the wrong model by default and can trigger bogus threshold auto-lowering warnings even though the active agent model already has the needed context window.

Reproduction

Use config like:

auxiliary:
  compression:
    provider: main
    model: ''

Run a session with a live model such as gpt-5.4 on openai-codex.

Compression feasibility checks and compression calls resolve through provider: main, but the blank model does not pick up the live session model. It falls back to Codex's hardcoded auxiliary default.

Actual behavior

Compression resolves to gpt-5.2-codex instead of the active session model.

Expected behavior

When provider: main is selected and no explicit auxiliary model override is configured, Hermes should use:

  1. the live session model
  2. then the configured main/default model
  3. only then a provider-specific fallback

Root cause

main_runtime is available to callers like compression, but _resolve_task_provider_model() does not accept or use it. So provider resolution can follow main, while model resolution still falls through to provider defaults.

Proposed fix

  • Thread main_runtime into _resolve_task_provider_model()
  • If requested provider is main and no explicit task model is set, inherit main_runtime['model']
  • Add regression coverage for both:
    • _resolve_task_provider_model() precedence
    • get_text_auxiliary_client() / call_llm() forwarding main_runtime

Verification

Local regression tests added and passing:

  • tests/agent/test_auxiliary_client.py
  • full file run passed after the change (86 passed locally)

extent analysis

TL;DR

To fix the issue, thread main_runtime into _resolve_task_provider_model() to inherit the live session model when provider: main is configured without an explicit auxiliary model.

Guidance

  • Verify that the main_runtime is correctly set and available to the _resolve_task_provider_model() function.
  • Update the _resolve_task_provider_model() function to accept and use main_runtime when the requested provider is main and no explicit task model is set.
  • Add regression tests to cover the precedence of _resolve_task_provider_model() and the forwarding of main_runtime in get_text_auxiliary_client() and call_llm().
  • Review the local regression tests in tests/agent/test_auxiliary_client.py to ensure they cover the expected behavior.

Example

No code snippet is provided as the issue already includes a proposed fix and the focus is on guiding the implementation.

Notes

The fix relies on correctly threading main_runtime into _resolve_task_provider_model() and updating the function to use it when necessary. Ensure that the main_runtime is correctly set and available to avoid any potential issues.

Recommendation

Apply the proposed workaround by threading main_runtime into _resolve_task_provider_model() and updating the function to inherit the live session model when provider: main is configured without an explicit auxiliary model. This approach directly addresses the root cause of the issue.

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…

FAQ

Expected behavior

When provider: main is selected and no explicit auxiliary model override is configured, Hermes should use:

  1. the live session model
  2. then the configured main/default model
  3. only then a provider-specific fallback

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix Auxiliary provider=main should inherit the live session model for compression [1 pull requests, 1 participants]