fix(executor): increase buffer size for stream scanners to 50MB across multiple executors

This commit is contained in:
sususu
2025-12-10 23:20:04 +08:00
parent 94d61c7b2b
commit 76c563d161
11 changed files with 15 additions and 15 deletions

View File

@@ -309,7 +309,7 @@ func (e *GeminiCLIExecutor) ExecuteStream(ctx context.Context, auth *cliproxyaut
}()
if opts.Alt == "" {
scanner := bufio.NewScanner(resp.Body)
scanner.Buffer(nil, 20_971_520)
scanner.Buffer(nil, 52_428_800) // 50MB
var param any
for scanner.Scan() {
line := scanner.Bytes()