Skip to content

Fix custom model context-window overflow recovery - #466

Open
zhouzhuozhzh-maker wants to merge 1 commit into
andrewyng:mainfrom
zhouzhuozhzh-maker:codex/fix-441-model-context-windows
Open

Fix custom model context-window overflow recovery#466
zhouzhuozhzh-maker wants to merge 1 commit into
andrewyng:mainfrom
zhouzhuozhzh-maker:codex/fix-441-model-context-windows

Conversation

@zhouzhuozhzh-maker

Copy link
Copy Markdown

Summary

  • add persistent per-model context-window overrides for custom and proxied models
  • merge overrides with curated metadata so the context meter and compaction engine share one effective value
  • reserve response/safety headroom when retaining recent history and hard-bound recovery summarization to the selected model's window
  • add Settings UI plus backend, engine, pure-policy, and Playwright coverage for a 32,768-token custom model

Verification

  • .venv/bin/python -m pytest -q — 1116 passed, 1 skipped
  • npm test — 108 passed
  • npm run build
  • npm run e2e -- e2e/compaction.spec.ts — 2 passed

Fixes #441

@zhouzhuozhzh-maker

Copy link
Copy Markdown
Author

Screenshot

Models → Context compaction with a custom 32,768-token window:
clipboard

lwxyfer added a commit to lwxyfer/openworker that referenced this pull request Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom-model sessions become unrecoverable on context overflow — add per-model context-window configuration

1 participant