From 73824bc99eec2701164837588a231b56b943c536 Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Tue, 3 Feb 2026 21:09:18 -0500 Subject: [PATCH] fix(glmt): gate retry rate limit logs behind verbose flag Rate limit retry messages now only appear when verbose mode is enabled, keeping test output clean while preserving debug capability. --- src/glmt/glmt-proxy.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/glmt/glmt-proxy.ts b/src/glmt/glmt-proxy.ts index 85d8c22f..f52d55a9 100644 --- a/src/glmt/glmt-proxy.ts +++ b/src/glmt/glmt-proxy.ts @@ -447,9 +447,11 @@ export class GlmtProxy { lastError = err; const delay = this.calculateRetryDelay(attempt, retryAfter); - console.error( - `[glmt-proxy] Rate limited, retry ${attempt + 1}/${this.retryConfig.maxRetries} after ${Math.round(delay)}ms` - ); + if (this.verbose) { + console.error( + `[glmt-proxy] Rate limited, retry ${attempt + 1}/${this.retryConfig.maxRetries} after ${Math.round(delay)}ms` + ); + } await this.sleep(delay); } @@ -507,9 +509,11 @@ export class GlmtProxy { lastError = err; const delay = this.calculateRetryDelay(attempt, retryAfter); - console.error( - `[glmt-proxy] Rate limited, retry ${attempt + 1}/${this.retryConfig.maxRetries} after ${Math.round(delay)}ms` - ); + if (this.verbose) { + console.error( + `[glmt-proxy] Rate limited, retry ${attempt + 1}/${this.retryConfig.maxRetries} after ${Math.round(delay)}ms` + ); + } await this.sleep(delay); }