From f3f31274e82e642e730a3c60a3b89fd62a8e47ed Mon Sep 17 00:00:00 2001 From: hkfires <10558748+hkfires@users.noreply.github.com> Date: Sun, 26 Oct 2025 20:01:46 +0800 Subject: [PATCH] refactor(wsrelay): rename RoundTrip to NonStream --- internal/runtime/executor/aistudio_executor.go | 4 ++-- internal/wsrelay/http.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/runtime/executor/aistudio_executor.go b/internal/runtime/executor/aistudio_executor.go index de90c63a..1765cd0e 100644 --- a/internal/runtime/executor/aistudio_executor.go +++ b/internal/runtime/executor/aistudio_executor.go @@ -72,7 +72,7 @@ func (e *AistudioExecutor) Execute(ctx context.Context, auth *cliproxyauth.Auth, AuthValue: authValue, }) - wsResp, err := e.relay.RoundTrip(ctx, e.provider, wsReq) + wsResp, err := e.relay.NonStream(ctx, e.provider, wsReq) if err != nil { recordAPIResponseError(ctx, e.cfg, err) return resp, err @@ -220,7 +220,7 @@ func (e *AistudioExecutor) CountTokens(ctx context.Context, auth *cliproxyauth.A AuthType: authType, AuthValue: authValue, }) - resp, err := e.relay.RoundTrip(ctx, e.provider, wsReq) + resp, err := e.relay.NonStream(ctx, e.provider, wsReq) if err != nil { recordAPIResponseError(ctx, e.cfg, err) return cliproxyexecutor.Response{}, err diff --git a/internal/wsrelay/http.go b/internal/wsrelay/http.go index f34a61ca..52ea2a1d 100644 --- a/internal/wsrelay/http.go +++ b/internal/wsrelay/http.go @@ -35,8 +35,8 @@ type StreamEvent struct { Err error } -// RoundTrip executes a non-streaming HTTP request using the websocket provider. -func (m *Manager) RoundTrip(ctx context.Context, provider string, req *HTTPRequest) (*HTTPResponse, error) { +// NonStream executes a non-streaming HTTP request using the websocket provider. +func (m *Manager) NonStream(ctx context.Context, provider string, req *HTTPRequest) (*HTTPResponse, error) { if req == nil { return nil, fmt.Errorf("wsrelay: request is nil") }