From 58290760a975b27c49df1c65739a9107ea36036b Mon Sep 17 00:00:00 2001 From: cybit Date: Tue, 27 Jan 2026 21:56:00 +0800 Subject: [PATCH] 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) --- sdk/cliproxy/auth/types.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/cliproxy/auth/types.go b/sdk/cliproxy/auth/types.go index 44825951..adafe577 100644 --- a/sdk/cliproxy/auth/types.go +++ b/sdk/cliproxy/auth/types.go @@ -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)