mirror of
https://github.com/Finesssee/ProxyPilot.git
synced 2026-11-19 02:17:46 +00:00
Synced all changes from router-for-me/CLIProxyAPIPlus including: Executor updates: - claude_executor: response decompression, beta extraction, model resolution - gemini_executor/codex_executor: usage reporting - antigravity_executor: fallback URLs, thinking metadata, token refresh - kiro_executor: token refresh, profile ARN handling, quota fallback Translator updates: - Updated all translators for improved request/response handling - Enhanced tool result formatting and streaming support Configuration: - Added IncognitoBrowser option for OAuth - Updated KiroKey configuration - Enhanced PayloadConfig options SDK updates: - Auth refresh registry improvements - Cliproxy service enhancements - Added ErrNotImplemented for executor interface Excluded features (not synced): - Amp CLI Integration module - GitHub Copilot executor 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
32 lines
1.1 KiB
Go
32 lines
1.1 KiB
Go
package auth
|
|
|
|
import (
|
|
"time"
|
|
|
|
cliproxyauth "github.com/router-for-me/CLIProxyAPI/v6/sdk/cliproxy/auth"
|
|
)
|
|
|
|
func init() {
|
|
registerRefreshLead("codex", func() Authenticator { return NewCodexAuthenticator() })
|
|
registerRefreshLead("claude", func() Authenticator { return NewClaudeAuthenticator() })
|
|
registerRefreshLead("qwen", func() Authenticator { return NewQwenAuthenticator() })
|
|
registerRefreshLead("iflow", func() Authenticator { return NewIFlowAuthenticator() })
|
|
registerRefreshLead("gemini", func() Authenticator { return NewGeminiAuthenticator() })
|
|
registerRefreshLead("gemini-cli", func() Authenticator { return NewGeminiAuthenticator() })
|
|
registerRefreshLead("antigravity", func() Authenticator { return NewAntigravityAuthenticator() })
|
|
registerRefreshLead("kiro", func() Authenticator { return NewKiroAuthenticator() })
|
|
}
|
|
|
|
func registerRefreshLead(provider string, factory func() Authenticator) {
|
|
cliproxyauth.RegisterRefreshLeadProvider(provider, func() *time.Duration {
|
|
if factory == nil {
|
|
return nil
|
|
}
|
|
auth := factory()
|
|
if auth == nil {
|
|
return nil
|
|
}
|
|
return auth.RefreshLead()
|
|
})
|
|
}
|