Repository navigation
Studio: read several web pages at once on local models - #16489
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[skip ci]
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b236e2abc7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| with _WEB_PDF_LOCK: | ||
| # Time queued behind another read's PDF is not spent on this read. | ||
| if deadline is not None: | ||
| deadline += time.monotonic() - queued_at | ||
| pdf_text = _extract_pdf_text(raw_bytes) |
There was a problem hiding this comment.
Recheck cancellation before parsing a queued PDF
If a multi-PDF batch is canceled while reads are waiting on _WEB_PDF_LOCK, those queued reads still invoke _extract_pdf_text when the lock becomes available; the next cancellation check happens only after extraction. An isolated _fetch_url_raw probe confirmed that the parser starts with cancel_event already set. Consequently, stopped prefetches continue performing expensive extraction serially under the global lock and can delay PDF reads in subsequent turns. Recheck cancellation after acquiring the lock and before invoking the parser, and make canceled waiters able to leave the queue.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Leaving this as is. The cancelled reads' results are already thrown away, and a read in the next turn that queues behind them does not lose any of its timeout since queue time no longer counts, so the worst case is a short delay right after a stop, not a wrong or lost result.
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
I cancelled the CI runs on this PR for now, since Codex hasn't converged at the current head yet: Codex still has open findings on the head commit. CI here runs on the team's shared runner pool, and it's backed up right now (380+ runs queued), so runs on code that's still changing push everyone else's back. Once Codex says "Didn't find any major issues" on the head commit, one push or a re-run brings CI back. A small ask going forward: hold the push until Codex is clean, and batch follow-up fixes into a single push. Thanks! |
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
When a local GGUF model asked for several web pages in one reply, Studio read them one after another, so three pages that each take 3 seconds kept the chat waiting about 10 seconds. Cloud models already read such pages together; local models did not.
Those reads now overlap on local models too, up to 4 at once and never two on the same site. Three 3 second pages take about 3.4 seconds instead of 9.6. Only the download moves earlier. Tool cards, results, the room each result gets in the context window, and what the model reads all stay in the original order and are unchanged.
This applies in Run automatically and Full access. In the modes that ask first, each page still waits for its own approval, and searches and other tools still run one at a time. If a stream closes between two tool calls, a page already started can finish in the background, for at most 60 seconds, and its result is dropped.