NousResearch/hermes-agent

Auxiliary client max_tokens handling in _build_call_kwargs across providers

Cluster 41035 · agent · Bug. Data as of

4 open items. Fix merged in #99725 on 31 Aug 2026. Check it covers your case.

The short answer

2open issues
2open PRs
16items grouped
Known?
Yes. 16 related items grouped here, 2 issues already closed.
Fix event
A fix was merged to main in PR #99725. Check it covers your case. No release data is tracked. Fix link checked: 31 Aug 2026.
Tracker
The maintainers' tracker marks this unresolved. That is separate from the fix event.

Most members concern auxiliary LLM calls (title generation, compression, vision) where max_tokens is dropped, inflated, or not passed explicitly, with reported effects on OpenRouter (402 errors), LiteLLM/Bedrock proxies (HTTP 400), and local backends. The members are a mix of issue reports and proposed fixes, and the specific provider scenarios differ.

Open issues2

  • Issue#50132[Bug]: _build_call_kwargs silently drops max_tokens for OpenAI-compatible endpoints, causing runaway compression summaries on local backends
  • Issue#53677Auxiliary vision fails with LiteLLM proxy + Bedrock: max_tokens omitted causes HTTP 400

Open PRs2

  • PR#53681fix(auxiliary): pass max_tokens explicitly for LiteLLM/Bedrock proxies
  • PR#56957[codex] Keep OpenRouter auxiliary token caps

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #99725 fix(compression): OpenRouter fallback survives credit-limited 402s by clamping to the affordable budget (salvage #41055)

    merged to main

    files: agent/auxiliary_client.py, tests/agent/test_aux_affordable_402_retry.py, tests/agent/test_auxiliary_openrouter_max_tokens.py

9 PRs closed without merging

From the close comments: duplicate 4 · superseded by another PR 2 · done elsewhere 1 · merged via another change 1 · other 1

  • #41055 fix(auxiliary): preserve max_tokens for OpenRouter to prevent free-tier 402 · merged via another change → 13c3958, #99725, #49785, #41035
  • #41063 fix(openrouter): include max_tokens + fix credential pool fallback (#41035) · done elsewhere → c56b39c, #53906, #23495, #41035
  • #50139 fix(auxiliary): preserve explicit max_tokens caps (#50132) · other → #50139, #50132
  • #50147 fix(auxiliary): preserve explicit caps for compatible routes · superseded by another PR → #50132
  • #50158 fix(agent): pass max_tokens unconditionally in _build_call_kwargs · duplicate → #50139, #50132, #50147
Show 4 more
  • #56934 fix(auxiliary): preserve max_tokens for OpenRouter to prevent 402 · superseded by another PR → #41055
  • #56960 fix(auxiliary): preserve OpenRouter max_tokens for title generation · duplicate → #41055, #56934, #56957
  • #57382 fix(auxiliary): cap OpenRouter max tokens · duplicate → #41055, #56901
  • #58053 fix(auxiliary): preserve OpenRouter max tokens · duplicate → #41055
Closed issues · 2
  • Closed#41035aux: _build_call_kwargs strips max_tokens for OpenRouter — free tier gets HTTP 402, falls back to text-only model
  • Closed#56901Auxiliary title generation falls back to OpenRouter with inflated max_tokens (65536) when user's main provider is a custom endpoint
How this cluster was grouped
  • Link evidence (partly structural links): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
  • Members outside that structural core may belong to a different underlying problem.
  • Pairwise link density 0.12: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. 1.00 means every pair is linked.

For your agent

The same facts, typed.