mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-02 20:40:52 +08:00
feat(executor): add debug logs for rate-limiting retries in Gemini CLI executor
This commit is contained in:
@@ -166,6 +166,7 @@ func (e *GeminiCLIExecutor) Execute(ctx context.Context, auth *cliproxyauth.Auth
|
||||
lastBody = append([]byte(nil), data...)
|
||||
log.Debugf("request error, error status: %d, error body: %s", httpResp.StatusCode, string(data))
|
||||
if httpResp.StatusCode == 429 {
|
||||
log.Debugf("gemini cli executor: rate limited, retrying with next model")
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -281,6 +282,7 @@ func (e *GeminiCLIExecutor) ExecuteStream(ctx context.Context, auth *cliproxyaut
|
||||
lastBody = append([]byte(nil), data...)
|
||||
log.Debugf("request error, error status: %d, error body: %s", httpResp.StatusCode, string(data))
|
||||
if httpResp.StatusCode == 429 {
|
||||
log.Debugf("gemini cli executor: rate limited, retrying with next model")
|
||||
continue
|
||||
}
|
||||
err = statusErr{code: httpResp.StatusCode, msg: string(data)}
|
||||
@@ -451,6 +453,7 @@ func (e *GeminiCLIExecutor) CountTokens(ctx context.Context, auth *cliproxyauth.
|
||||
lastStatus = resp.StatusCode
|
||||
lastBody = append([]byte(nil), data...)
|
||||
if resp.StatusCode == 429 {
|
||||
log.Debugf("gemini cli executor: rate limited, retrying with next model")
|
||||
continue
|
||||
}
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user