mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 13:00:52 +08:00
Add token refresh handling for 401 responses across clients
- Implemented `RefreshTokens` method in client interfaces and Gemini clients. - Updated handlers to call `RefreshTokens` on 401 responses and retry requests if token refresh succeeds. - Enhanced error handling and retry logic to accommodate token refresh flow.
This commit is contained in:
@@ -51,4 +51,6 @@ type Client interface {
|
||||
|
||||
// Provider returns the name of the AI service provider (e.g., "gemini", "claude").
|
||||
Provider() string
|
||||
|
||||
RefreshTokens(ctx context.Context) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user