hermes - 💡(How to fix) Fix [Bug]: Auxiliary compression model does not inherit context_length from custom_providers

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…

When the compression model is set to auto (model: ''), it inherits the main model name from model.default but does NOT look up the context_length from custom_providers for that model.

Root Cause

When the compression model is set to auto (model: ''), it inherits the main model name from model.default but does NOT look up the context_length from custom_providers for that model.

Fix Action

Workaround

Add context_length directly to model block:

model:
  context_length: 1000000

Code Example

model:
  default: qwen/deepseek-v4-pro
  provider: custom:my-gateway

custom_providers:
- name: my-gateway
  base_url: https://ais.example.com/v1
  models:
    qwen/deepseek-v4-pro:
      context_length: 1000000

auxiliary:
  compression:
    provider: auto
    model: ''

---

Compression model qwen/deepseek-v4-pro (ais.example.com) context is 256,000 tokens,
but the main model compression threshold was 500,000 tokens.
Auto-lowered this session threshold to 256,000 tokens.

---

model:
  context_length: 1000000
RAW_BUFFERClick to expand / collapse

Description

When the compression model is set to auto (model: ''), it inherits the main model name from model.default but does NOT look up the context_length from custom_providers for that model.

Steps to reproduce

  1. Configure a named custom provider with explicit context_length:
model:
  default: qwen/deepseek-v4-pro
  provider: custom:my-gateway

custom_providers:
- name: my-gateway
  base_url: https://ais.example.com/v1
  models:
    qwen/deepseek-v4-pro:
      context_length: 1000000

auxiliary:
  compression:
    provider: auto
    model: ''
  1. Start a session, observe:
Compression model qwen/deepseek-v4-pro (ais.example.com) context is 256,000 tokens,
but the main model compression threshold was 500,000 tokens.
Auto-lowered this session threshold to 256,000 tokens.

Expected

Compression model should inherit context_length: 1000000 from custom_providers.

Actual

Uses hardcoded default 256,000, ignoring custom_providers.

Workaround

Add context_length directly to model block:

model:
  context_length: 1000000

Impact

Every subagent prints this warning. Users with custom OpenAI-compatible providers whose /models endpoint does not return context_length are affected.

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