Merge pull request #481 from sususu98/fix/increase-buffer-size

fix: increase buffer size for stream scanners to 50MB across multiple executors
This commit is contained in:
Luis Pater
2025-12-11 21:20:54 +08:00
committed by GitHub
11 changed files with 15 additions and 15 deletions

View File

@@ -249,7 +249,7 @@ func (e *GeminiExecutor) ExecuteStream(ctx context.Context, auth *cliproxyauth.A
}
}()
scanner := bufio.NewScanner(httpResp.Body)
scanner.Buffer(nil, 20_971_520)
scanner.Buffer(nil, 52_428_800) // 50MB
var param any
for scanner.Scan() {
line := scanner.Bytes()