From 27c68f5bb2af966959706cbc1fb9ae8ab81f523d Mon Sep 17 00:00:00 2001 From: Luis Pater Date: Fri, 27 Feb 2026 20:47:46 +0800 Subject: [PATCH] fix(auth): replace MarkResult with hook OnResult for result handling --- sdk/cliproxy/auth/conductor.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sdk/cliproxy/auth/conductor.go b/sdk/cliproxy/auth/conductor.go index df44c855..0294f1b4 100644 --- a/sdk/cliproxy/auth/conductor.go +++ b/sdk/cliproxy/auth/conductor.go @@ -169,12 +169,12 @@ func NewManager(store Store, selector Selector, hook Hook) *Manager { hook = NoopHook{} } manager := &Manager{ - store: store, - executors: make(map[string]ProviderExecutor), - selector: selector, - hook: hook, - auths: make(map[string]*Auth), - providerOffsets: make(map[string]int), + store: store, + executors: make(map[string]ProviderExecutor), + selector: selector, + hook: hook, + auths: make(map[string]*Auth), + providerOffsets: make(map[string]int), refreshSemaphore: make(chan struct{}, refreshMaxConcurrency), } // atomic.Value requires non-nil initial value. @@ -691,14 +691,14 @@ func (m *Manager) executeCountMixedOnce(ctx context.Context, providers []string, if ra := retryAfterFromError(errExec); ra != nil { result.RetryAfter = ra } - m.MarkResult(execCtx, result) + m.hook.OnResult(execCtx, result) if isRequestInvalidError(errExec) { return cliproxyexecutor.Response{}, errExec } lastErr = errExec continue } - m.MarkResult(execCtx, result) + m.hook.OnResult(execCtx, result) return resp, nil } }