Skip to content

Run a hosted review's batches concurrently - #159

Merged
morgaesis merged 1 commit into
mainfrom
fix/concurrent-review-batches
Aug 18, 2026
Merged

morgaesis merged 1 commit into
mainfrom
fix/concurrent-review-batches

Conversation

@morgaesis

Copy link
Copy Markdown
Contributor

Batch requests carry their own prompts and are collected by index, so nothing orders them, and max_hosted_review_batches already prices a review's capacity at the concurrent wave count. Execution ran them one at a time outside the deterministic large-review path, which divided the generator phase by the batch count: a four-batch review gave each batch a quarter of the phase, below the review model's p95, and lost a batch to a timeout more often than not.

Admission and execution now take the same concurrency, so the waves the schedule is checked against are the waves that run, and a review that fits in one wave gets the phase rather than a fraction of it.

Batch requests carry their own prompts and are collected by index, so
nothing orders them, and `max_hosted_review_batches` already prices a
review's capacity at the concurrent wave count. Execution ran them one
at a time outside the deterministic large-review path, which divided the
generator phase by the batch count: a four-batch review gave each batch
a quarter of the phase, under the review model's tail latency, and lost
a batch to a timeout more often than not.

Admission and execution now take the same concurrency, so the waves the
schedule is checked against are the waves that run.
@morgaesis
morgaesis merged commit e6ccd5a into main Aug 18, 2026
10 checks passed
@morgaesis
morgaesis deleted the fix/concurrent-review-batches branch August 18, 2026 23:58
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