Skip to content

fix(llmrec): cap captured provider response bodies - #356

Merged
BaaRai merged 1 commit into
BaaRai:mainfrom
Coff0xc:fix/llm-capture-cap
Nov 19, 2026
Merged

BaaRai merged 1 commit into
BaaRai:mainfrom
Coff0xc:fix/llm-capture-cap

Conversation

@Coff0xc

@Coff0xc Coff0xc commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

TeeResponse mirrored every byte of every provider attempt into memory with no limit, so a large or retrying stream could exhaust RAM.

Keep at most 1 MiB per attempt and 8 attempts. The live stream is unchanged.

Tested: go test ./llmrec pass.

Copilot AI balanced review requested due to automatic review settings November 19, 2026 02:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

TeeResponse mirrored every byte of every attempt into memory with
no limit, so a large or retrying stream could exhaust RAM.
@BaaRai
BaaRai force-pushed the fix/llm-capture-cap branch from b3ca948 to 53f764b Compare November 19, 2026 13:26
@BaaRai
BaaRai merged commit fbcbe3a into BaaRai:main Nov 19, 2026
5 checks passed
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.

3 participants