Repository navigation
Conversation
Signed-off-by: Serge Panev <spanev@nvidia.com>
…st placeholders Signed-off-by: Serge Panev <spanev@nvidia.com>
This was referenced Oct 22, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stirrup's
ChatCompletionsClient(max_tokens=...)is both the per-request output cap (sent asmax_completion_tokens) and the context window the agent uses to decide when to summarize (token_usage.total / client.max_tokens, at 70%). The Apex agent passesmax_output_tokens(32768), so Stirrup summarizes at ~23k tokens whatever the policy's context window is. On long tasks the agent then loops read -> summarize -> re-read until it reaches the turn cap.stirrup_runtime.py:context_window_client()subclasses the Stirrup client and overrides only themax_tokensproperty, so summarization uses the configured window while requests keepmax_completion_tokens = max_output_tokens.app.py,configs/apex_agent.yaml:context_window_tokens(apex_agent_context_window_tokens), unset by default, which keeps the current behavior.With a 262k-context policy and
apex_agent_context_window_tokens: 262144, the first summary moves from ~23k tokens to ~185k.#3668 changes the same client setup; this commit rebased onto it is on
spanev/apex-context-window-on-prebuilt-world.