Skip to content

[WIP] Refactor context management around two model capacity fields - #4336

Draft
JasonW404 wants to merge 1 commit into
developfrom
refactor/context-management-two-capacities
Draft

JasonW404 wants to merge 1 commit into
developfrom
refactor/context-management-two-capacities

Conversation

@JasonW404

@JasonW404 JasonW404 commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Context preparation previously deducted retired model input/output reserve values and could reintroduce a 4096-token output cap. This PR makes runtime capacity depend on the combined context window and output capability, omits completion output-length fields, and moves normal maintenance to accepted response/closed tool-step boundaries.

Next input estimates use the previous actual prompt usage plus the local payload delta. Default maintenance headroom is min(20% of the combined window, 20,000 tokens), with a 2x headroom target. Legacy profile/storage fields remain readable for the later cleanup PR.

Validation: 2,172 unique local UT passed, plus 30 fixed D3 parameter variants over the actual SDK/CoreAgent and an owned HTTP/SSE provider. Strict formal-asset validation, copyright checks and diff checks passed.

Delivery status: product implementation is committed locally as 37f34301f8aade075628f856601bf6fb55e55509 and has NOT been pushed. This remote draft currently contains the empty bootstrap only. Required nexent-test dev/real-model/Phoenix and final container acceptance are blocked by Multipass snap-confine missing cap_dac_override. The standard formal worker also rejects test-home inside the checkout, conflicting with the workspace artifact-location rule; direct case pytest passed, worker receipt remains blocked. No final acceptance or CI pass is claimed.

This branch has not been deployed

No deployments
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.

1 participant