Skip to content

fix: use custom provider context for aux compression - #20093

Closed
MatthewPJ wants to merge 1 commit into
NousResearch:mainfrom
MatthewPJ:fix/aux-compression-custom-provider-context
Closed

fix: use custom provider context for aux compression#20093
MatthewPJ wants to merge 1 commit into
NousResearch:mainfrom
MatthewPJ:fix/aux-compression-custom-provider-context

Conversation

@MatthewPJ

Copy link
Copy Markdown

Summary

  • persist resolved custom_providers on AIAgent
  • pass custom_providers into auxiliary compression context-length detection
  • add regression coverage for named custom provider per-model context_length

Test Plan

  • /Users/matthew/.hermes/hermes-agent/venv/bin/python -m pytest tests/run_agent/test_compression_feasibility.py tests/agent/test_model_metadata_local_ctx.py -q -o 'addopts='

@alt-glitch alt-glitch added type/bug Something isn't working comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P2 Medium — degraded but workaround exists labels May 5, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #19564 (and #13540, #18877) — same fix: pass custom_providers into aux compression context-length detection in run_agent.py. See also tracking issue #12977.

1 similar comment
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #19564 (and #13540, #18877) — same fix: pass custom_providers into aux compression context-length detection in run_agent.py. See also tracking issue #12977.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the fix. This is already implemented on current main, so I'm closing this as implemented there.

Automated hermes-sweeper review evidence:

  • Current main stores resolved compatible custom providers on the agent for compression feasibility reuse: agent/agent_init.py:1395-1407.
  • Current main passes those providers into auxiliary compression context-length detection: agent/conversation_compression.py:136-145 calls get_model_context_length(..., custom_providers=agent._custom_providers).
  • get_model_context_length consumes that value before probing and honors per-model custom provider context_length overrides: agent/model_metadata.py:1530-1578.
  • The implementing commit is 7becb19ea00c13bdff6f78b71aa3ddfb0bdb5378 (fix(auxiliary): forward custom_providers to compression model context-length detection), which is contained in release tag v2026.5.16.

The prior duplicate comments from @alt-glitch match this code path.

@teknium1 teknium1 closed this Jun 11, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P2 Medium — degraded but workaround exists sweeper:implemented-on-main Sweeper: behavior already present on current main type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants