Fix some bugs.

This commit is contained in:
Luis Pater
2025-08-29 03:00:43 +08:00
parent 3704dae342
commit e9e0016a63
2 changed files with 3 additions and 2 deletions

View File

@@ -17,6 +17,7 @@ import (
. "github.com/luispater/CLIProxyAPI/internal/constant" . "github.com/luispater/CLIProxyAPI/internal/constant"
"github.com/luispater/CLIProxyAPI/internal/interfaces" "github.com/luispater/CLIProxyAPI/internal/interfaces"
"github.com/luispater/CLIProxyAPI/internal/registry" "github.com/luispater/CLIProxyAPI/internal/registry"
"github.com/luispater/CLIProxyAPI/internal/util"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )
@@ -193,7 +194,7 @@ outLoop:
continue outLoop // Restart the client selection process continue outLoop // Restart the client selection process
} }
case 403, 408, 500, 502, 503, 504: case 403, 408, 500, 502, 503, 504:
log.Debugf("http status code %d, switch client", errInfo.StatusCode) log.Debugf("http status code %d, switch client, %s", errInfo.StatusCode, util.HideAPIKey(cliClient.GetEmail()))
retryCount++ retryCount++
continue outLoop continue outLoop
default: default:

View File

@@ -535,7 +535,7 @@ func (c *ClaudeClient) GetEmail() string {
if ts, ok := c.tokenStorage.(*claude.ClaudeTokenStorage); ok { if ts, ok := c.tokenStorage.(*claude.ClaudeTokenStorage); ok {
return ts.Email return ts.Email
} else { } else {
return "" return c.cfg.ClaudeKey[c.apiKeyIndex].APIKey
} }
} }