Repository navigation
Conversation
Skill reviews sent no max_tokens, so a runaway response ran to the model's own output limit before Pi reported output_limit and the hunk failed. Production traces show such responses near 500k output tokens after 45 to 50 minutes, with the work discarded. Cap each response at 64k output tokens, the same mechanism auxiliary calls already use. Normal reviews stay far below it: across 264 Grok 4.5 hunk reviews, total output per hunk peaked at about 18k tokens.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully 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.
Skill reviews on Pi sent no
max_tokens, so a runaway response kept generating until it hit the model's own output limit. Pi then reportedoutput_limit, and the hunk failed with its output discarded. Production traces show 77 such responses over 14 days, each near 500k output tokens and running 45 to 50 minutes. Auxiliary calls already pass a cap through the same path (pi.ts,runPiPrompt); skill reviews did not.This caps each skill review response at 64k output tokens. A hunk that hits it fails as before, just early.
output_limitis not retried, so this does not add attempts.Sizing: across 264 Grok 4.5 hunk reviews from security-review benchmark and PR runs, total output per hunk (all turns) had a median of 837 tokens, p99 of 10k, and a max of 17.7k. Whole-file corpus chunks averaged about 10.8k. 64k leaves room for long reasoning on one response while stopping a runaway about 8x sooner.
The new test asserts the cap reaches the model call. It fails without the change and passes with it.