Skip to content

fix(agent): pass custom providers to aux context checks - #23563

Closed
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:codex/21947-aux-context-length
Closed

fix(agent): pass custom providers to aux context checks#23563
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:codex/21947-aux-context-length

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes auxiliary compression feasibility checks so they pass through configured custom providers when checking the available context window, which keeps custom-model auxiliary setups from being misclassified.

Related Issue

Fixes #21947

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • Persisted custom providers during agent initialization in run_agent.py
  • Passed custom providers into the compression feasibility check
  • Added regression coverage in tests/run_agent/test_compression_feasibility.py

How to Test

  1. Run uv run --frozen pytest -q -o addopts='' tests/run_agent/test_compression_feasibility.py
  2. Run uv run --frozen ruff check run_agent.py tests/run_agent/test_compression_feasibility.py
  3. Confirm both commands pass

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 15.x

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

  • uv run --frozen pytest -q -o addopts='' tests/run_agent/test_compression_feasibility.py -> 17 passed

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint labels May 11, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #13540 (and competing PRs #18877, #20724). All pass custom_providers to compression feasibility check. Fixes #21947/#12977/#20608.

@teknium1

Copy link
Copy Markdown
Contributor

Automated hermes-sweeper review: this is now implemented on current main.

Evidence:

Thanks for the fix; the behavior is covered by the current main implementation.

@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 duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have 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.

[Bug]: Auxiliary compression model does not inherit context_length from custom_providers

3 participants