Skip to content

fix: reapply compression feasibility guard after model switch - #15541

Closed
leavrcn wants to merge 2 commits into
NousResearch:mainfrom
leavrcn:fix/runtime-context-length-priority-yfg54
Closed

fix: reapply compression feasibility guard after model switch#15541
leavrcn wants to merge 2 commits into
NousResearch:mainfrom
leavrcn:fix/runtime-context-length-priority-yfg54

Conversation

@leavrcn

@leavrcn leavrcn commented Apr 25, 2026

Copy link
Copy Markdown

Summary

  • re-run _check_compression_model_feasibility() after in-place model switches
  • prevent context compressors from keeping a threshold recalculated above the auxiliary compression model's real context window
  • add a regression test covering the threshold-reset path during switch_model()

Test Plan

  • python -m pytest -q tests/run_agent/test_compression_feasibility.py

Notes

This PR intentionally includes only the runtime fix and its regression test. Other local uncommitted changes were left out.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint area/config Config system, migrations, profiles labels Apr 25, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related to PRs #12316, #10690, #14008, #8786 — all address context-length override resolution across runtime paths. Consider consolidating.

@leavrcn leavrcn changed the title fix: prefer per-model context length overrides at runtime fix: reapply compression feasibility guard after model switch Apr 25, 2026
@leavrcn

leavrcn commented Jul 12, 2026

Copy link
Copy Markdown
Author

Closing — superseded by active work under PR #50384. Will reopen if needed.

@leavrcn leavrcn closed this Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants