Repository navigation
feat(coderd/x/chatd/mcpclient): count only text toward the in-process tool result cap - #31386
Conversation
8c9f73b to
b0f3fbe
Compare
b0f3fbe to
da244f2
Compare
|
@codex security review |
|
@codex review |
Codex Review Summary: ✅ CompletedThis 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. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! 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 Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
da244f2 to
704b4f8
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 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". |
704b4f8 to
106bfca
Compare
106bfca to
1a3c946
Compare
1a3c946 to
4047bc3
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? 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". |
4047bc3 to
d266631
Compare
… tool result cap In-process MCP servers run trusted code in coderd. Their tool results now count only text toward the 256 KiB cap, so their media is bounded only by the chatloop tool media cap. Inline servers still count base64 media toward the cap.
d266631 to
8d8c8f3
Compare
Closes CODAGT-1425 Stacked on #31386. coder/fantasy#78, which is already on `main`, fixed the searches with no reasoning before them by sending them inline without their `id`. Stored chats still send a search as an `item_reference` when a reasoning item came right before it, though. The API pairs any stored ID with that reasoning item and rejects the whole request if it's missing, and a reference doesn't save any tokens over an inline item anyway. This bumps fantasy to pick up coder/fantasy#77, which just never references a search, so stored chats now replay earlier searches inline, like unstored ones. It also drops the `id` from replayed computer calls, which have the same problem. I've had to stack this on the CODAGT-1430 PRs, as coder/fantasy#77 merged after coder/fantasy#73 and coder/fantasy#74, so any pin that has it has them too. `TestOpenAIResponsesNoStaleWebSearchReplay` now covers a stored chat, and I deleted `TestOpenAIResponsesFullReplayPairsReasoningAndWebSearch`, as it asserted the order of references we no longer send.
Part of CODAGT-1430. Stacked on #31385.
Inline and in-process MCP servers cap each tool result at 256 KiB, and media counts at its base64 size, so a PDF over about 190 KiB becomes an error. In-process servers are our own code running in coderd, so we'll count only their text toward the cap, and leave their media to the 10 MiB tool media cap in chatloop. Inline servers are untrusted, so they still count base64 media.