mirror of
https://github.com/router-for-me/CLIProxyAPIPlus.git
synced 2026-06-01 03:10:36 +08:00
fix: support github-copilot provider in AccountInfo logging
Changed the provider matching logic in AccountInfo() method to use prefix matching instead of exact matching. This allows both 'github' (Kiro OAuth) and 'github-copilot' providers to be correctly identified as OAuth providers, enabling proper debug logging output. Before: Use OAuth logs were missing for github-copilot requests After: Logs show "Use OAuth provider=github-copilot auth_file=..." Co-Authored-By: Claude (claude-sonnet-4.5) <noreply@anthropic.com>
This commit is contained in:
@@ -227,8 +227,8 @@ func (a *Auth) AccountInfo() (string, string) {
|
||||
}
|
||||
}
|
||||
|
||||
// For GitHub provider, return username
|
||||
if strings.ToLower(a.Provider) == "github" {
|
||||
// For GitHub provider (including github-copilot), return username
|
||||
if strings.HasPrefix(strings.ToLower(a.Provider), "github") {
|
||||
if a.Metadata != nil {
|
||||
if username, ok := a.Metadata["username"].(string); ok {
|
||||
username = strings.TrimSpace(username)
|
||||
|
||||
Reference in New Issue
Block a user