Skip to content

Compact before sampling when switching to a smaller context model#11403

Closed
aibrahim-oai wants to merge 4 commits intostore-previous-turn-contextfrom
pre-sampling-smaller-context-compact
Closed

Compact before sampling when switching to a smaller context model#11403
aibrahim-oai wants to merge 4 commits intostore-previous-turn-contextfrom
pre-sampling-smaller-context-compact

Conversation

@aibrahim-oai
Copy link
Collaborator

  • run pre-sampling compact when switching to a model with a smaller context window after usage crosses the new model limit.
  • add e2e coverage for switch and resume+switch flows using 273k -> 125k context window models.

@aibrahim-oai aibrahim-oai changed the base branch from main to store-previous-turn-context February 11, 2026 03:53

if run_pre_sampling_compact(&sess, &turn_context)
.await
.is_err()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

surprised we return None here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if error, we kill the loop with no final message. This was your request.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My request was to kill the loop. Having the message seems fine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but there is not message at this point though

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.

2 participants

Comments