mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
**refactor(executor): simplify Gemini CLI execution and remove internal retry logic**
- Removed nested retry handling for 429 rate limit errors. - Simplified request/response handling by cleaning redundant retry-related code. - Eliminated `parseRetryDelay` function and max retry configuration logic.
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/router-for-me/CLIProxyAPI/v6/internal/config"
|
||||
"github.com/router-for-me/CLIProxyAPI/v6/internal/util"
|
||||
@@ -340,8 +341,9 @@ func (e *OpenAICompatExecutor) overrideModel(payload []byte, model string) []byt
|
||||
}
|
||||
|
||||
type statusErr struct {
|
||||
code int
|
||||
msg string
|
||||
code int
|
||||
msg string
|
||||
retryAfter *time.Duration
|
||||
}
|
||||
|
||||
func (e statusErr) Error() string {
|
||||
@@ -350,4 +352,5 @@ func (e statusErr) Error() string {
|
||||
}
|
||||
return fmt.Sprintf("status %d", e.code)
|
||||
}
|
||||
func (e statusErr) StatusCode() int { return e.code }
|
||||
func (e statusErr) StatusCode() int { return e.code }
|
||||
func (e statusErr) RetryAfter() *time.Duration { return e.retryAfter }
|
||||
|
||||
Reference in New Issue
Block a user