fix(executor): pass authID to relay instead of provider

This commit is contained in:
hkfires
2025-10-28 19:28:26 +08:00
parent 5dced4c0a6
commit 663b9b35ab

View File

@@ -73,7 +73,7 @@ func (e *AIStudioExecutor) Execute(ctx context.Context, auth *cliproxyauth.Auth,
AuthValue: authValue, AuthValue: authValue,
}) })
wsResp, err := e.relay.NonStream(ctx, e.provider, wsReq) wsResp, err := e.relay.NonStream(ctx, authID, wsReq)
if err != nil { if err != nil {
recordAPIResponseError(ctx, e.cfg, err) recordAPIResponseError(ctx, e.cfg, err)
return resp, err return resp, err
@@ -124,7 +124,7 @@ func (e *AIStudioExecutor) ExecuteStream(ctx context.Context, auth *cliproxyauth
AuthType: authType, AuthType: authType,
AuthValue: authValue, AuthValue: authValue,
}) })
wsStream, err := e.relay.Stream(ctx, e.provider, wsReq) wsStream, err := e.relay.Stream(ctx, authID, wsReq)
if err != nil { if err != nil {
recordAPIResponseError(ctx, e.cfg, err) recordAPIResponseError(ctx, e.cfg, err)
return nil, err return nil, err
@@ -221,7 +221,7 @@ func (e *AIStudioExecutor) CountTokens(ctx context.Context, auth *cliproxyauth.A
AuthType: authType, AuthType: authType,
AuthValue: authValue, AuthValue: authValue,
}) })
resp, err := e.relay.NonStream(ctx, e.provider, wsReq) resp, err := e.relay.NonStream(ctx, authID, wsReq)
if err != nil { if err != nil {
recordAPIResponseError(ctx, e.cfg, err) recordAPIResponseError(ctx, e.cfg, err)
return cliproxyexecutor.Response{}, err return cliproxyexecutor.Response{}, err