Skip to content

Commit 6294825

Browse files
authored
deps: bumps tool versions (#1753)
**Description** This upgrades tool versions in tools/go.mod. Most notable change is that due to the golangci-lint upgrade, this renames the internal/tracing/api package to internal/tracing/tracingapi. --------- Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
1 parent d8466ed commit 6294825

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+504
-490
lines changed

internal/endpointspec/endpointspec.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"github.com/envoyproxy/ai-gateway/internal/filterapi"
1919
"github.com/envoyproxy/ai-gateway/internal/internalapi"
2020
"github.com/envoyproxy/ai-gateway/internal/json"
21-
tracing "github.com/envoyproxy/ai-gateway/internal/tracing/api"
21+
"github.com/envoyproxy/ai-gateway/internal/tracing/tracingapi"
2222
"github.com/envoyproxy/ai-gateway/internal/translator"
2323
)
2424

@@ -59,7 +59,7 @@ type (
5959
// Returns:
6060
// * translator: The selected translator of type Translator[ReqT, RespT, RespChunkT].
6161
// * err: An error if translator selection fails.
62-
GetTranslator(schema filterapi.VersionedAPISchema, modelNameOverride string) (translator.Translator[ReqT, tracing.Span[RespT, RespChunkT]], error)
62+
GetTranslator(schema filterapi.VersionedAPISchema, modelNameOverride string) (translator.Translator[ReqT, tracingapi.Span[RespT, RespChunkT]], error)
6363
}
6464
// ChatCompletionsEndpointSpec implements EndpointSpec for /v1/chat/completions.
6565
ChatCompletionsEndpointSpec struct{}

internal/extproc/mocks_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"github.com/envoyproxy/ai-gateway/internal/filterapi"
2222
"github.com/envoyproxy/ai-gateway/internal/internalapi"
2323
"github.com/envoyproxy/ai-gateway/internal/metrics"
24-
tracing "github.com/envoyproxy/ai-gateway/internal/tracing/api"
24+
"github.com/envoyproxy/ai-gateway/internal/tracing/tracingapi"
2525
"github.com/envoyproxy/ai-gateway/internal/translator"
2626
)
2727

@@ -110,7 +110,7 @@ func (m *mockTranslator) ResponseError(_ map[string]string, body io.Reader) (new
110110
}
111111

112112
// ResponseBody implements [translator.OpenAIChatCompletionTranslator].
113-
func (m *mockTranslator) ResponseBody(_ map[string]string, body io.Reader, _ bool, _ tracing.ChatCompletionSpan) (newHeaders []internalapi.Header, newBody []byte, tokenUsage metrics.TokenUsage, responseModel string, err error) {
113+
func (m *mockTranslator) ResponseBody(_ map[string]string, body io.Reader, _ bool, _ tracingapi.ChatCompletionSpan) (newHeaders []internalapi.Header, newBody []byte, tokenUsage metrics.TokenUsage, responseModel string, err error) {
114114
if m.expResponseBody != nil {
115115
buf, err := io.ReadAll(body)
116116
require.NoError(m.t, err)

internal/extproc/processor_impl.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/envoyproxy/ai-gateway/internal/internalapi"
2525
"github.com/envoyproxy/ai-gateway/internal/llmcostcel"
2626
"github.com/envoyproxy/ai-gateway/internal/metrics"
27-
tracing "github.com/envoyproxy/ai-gateway/internal/tracing/api"
27+
"github.com/envoyproxy/ai-gateway/internal/tracing/tracingapi"
2828
"github.com/envoyproxy/ai-gateway/internal/translator"
2929
)
3030

@@ -45,7 +45,7 @@ import (
4545
// * ProcessorFactory: A factory function to create processors based on the configuration.
4646
func NewFactory[ReqT any, RespT any, RespChunkT any, EndpointSpecT endpointspec.Spec[ReqT, RespT, RespChunkT]](
4747
f metrics.Factory,
48-
tracer tracing.RequestTracer[ReqT, RespT, RespChunkT],
48+
tracer tracingapi.RequestTracer[ReqT, RespT, RespChunkT],
4949
_ EndpointSpecT, // This is a type marker to bind EndpointSpecT without specifying ReqT, RespT, RespChunkT explicitly.
5050
) ProcessorFactory {
5151
return func(config *filterapi.RuntimeConfig, requestHeaders map[string]string, logger *slog.Logger, isUpstreamFilter bool) (Processor, error) {
@@ -82,9 +82,9 @@ type (
8282
originalModel internalapi.OriginalModel
8383
forceBodyMutation bool
8484
// tracer is the tracer used for requests.
85-
tracer tracing.RequestTracer[ReqT, RespT, RespChunkT]
85+
tracer tracingapi.RequestTracer[ReqT, RespT, RespChunkT]
8686
// span is the tracing span for this request, created in ProcessRequestBody.
87-
span tracing.Span[RespT, RespChunkT]
87+
span tracingapi.Span[RespT, RespChunkT]
8888
// upstreamFilterCount is the number of upstream filters that have been processed.
8989
// This is used to determine if the request is a retry request.
9090
upstreamFilterCount int
@@ -100,7 +100,7 @@ type (
100100
requestHeaders map[string]string
101101
responseHeaders map[string]string
102102
responseEncoding string
103-
translator translator.Translator[ReqT, tracing.Span[RespT, RespChunkT]]
103+
translator translator.Translator[ReqT, tracingapi.Span[RespT, RespChunkT]]
104104
modelNameOverride internalapi.ModelNameOverride
105105
headerMutator *headermutator.HeaderMutator
106106
bodyMutator *bodymutator.BodyMutator
@@ -117,7 +117,7 @@ func newRouterProcessor[ReqT, RespT, RespChunkT any, EndpointSpecT endpointspec.
117117
config *filterapi.RuntimeConfig,
118118
requestHeaders map[string]string,
119119
logger *slog.Logger,
120-
tracer tracing.RequestTracer[ReqT, RespT, RespChunkT],
120+
tracer tracingapi.RequestTracer[ReqT, RespT, RespChunkT],
121121
) *routerProcessor[ReqT, RespT, RespChunkT, EndpointSpecT] {
122122
return &routerProcessor[ReqT, RespT, RespChunkT, EndpointSpecT]{
123123
config: config,

internal/extproc/processor_impl_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
"github.com/envoyproxy/ai-gateway/internal/llmcostcel"
2929
"github.com/envoyproxy/ai-gateway/internal/metrics"
3030
"github.com/envoyproxy/ai-gateway/internal/testing/testotel"
31-
tracing "github.com/envoyproxy/ai-gateway/internal/tracing/api"
31+
"github.com/envoyproxy/ai-gateway/internal/tracing/tracingapi"
3232
)
3333

3434
func TestNewFactory(t *testing.T) {
@@ -38,7 +38,7 @@ func TestNewFactory(t *testing.T) {
3838
t.Run("router", func(t *testing.T) {
3939
t.Parallel()
4040

41-
factory := NewFactory(nil, tracing.NoopChatCompletionTracer{}, endpointspec.ChatCompletionsEndpointSpec{})
41+
factory := NewFactory(nil, tracingapi.NoopChatCompletionTracer{}, endpointspec.ChatCompletionsEndpointSpec{})
4242
proc, err := factory(cfg, headers, slog.Default(), false)
4343
require.NoError(t, err)
4444
require.IsType(t, &chatCompletionProcessorRouterFilter{}, proc)
@@ -53,7 +53,7 @@ func TestNewFactory(t *testing.T) {
5353
t.Run("upstream", func(t *testing.T) {
5454
t.Parallel()
5555

56-
factory := NewFactory(&mockMetricsFactory{}, tracing.NoopChatCompletionTracer{}, endpointspec.ChatCompletionsEndpointSpec{})
56+
factory := NewFactory(&mockMetricsFactory{}, tracingapi.NoopChatCompletionTracer{}, endpointspec.ChatCompletionsEndpointSpec{})
5757
proc, err := factory(cfg, headers, slog.Default(), true)
5858
require.NoError(t, err)
5959
require.IsType(t, &chatCompletionProcessorUpstreamFilter{}, proc)
@@ -70,12 +70,12 @@ type (
7070
)
7171

7272
type mockTracer struct {
73-
tracing.NoopChatCompletionTracer
73+
tracingapi.NoopChatCompletionTracer
7474
startSpanCalled bool
75-
returnedSpan tracing.ChatCompletionSpan
75+
returnedSpan tracingapi.ChatCompletionSpan
7676
}
7777

78-
func (m *mockTracer) StartSpanAndInjectHeaders(_ context.Context, _ map[string]string, carrier propagation.TextMapCarrier, _ *openai.ChatCompletionRequest, _ []byte) tracing.ChatCompletionSpan {
78+
func (m *mockTracer) StartSpanAndInjectHeaders(_ context.Context, _ map[string]string, carrier propagation.TextMapCarrier, _ *openai.ChatCompletionRequest, _ []byte) tracingapi.ChatCompletionSpan {
7979
m.startSpanCalled = true
8080
carrier.Set("tracing-header", "1")
8181
if m.returnedSpan != nil {
@@ -87,7 +87,7 @@ func (m *mockTracer) StartSpanAndInjectHeaders(_ context.Context, _ map[string]s
8787
func Test_chatCompletionProcessorRouterFilter_ProcessRequestBody(t *testing.T) {
8888
t.Run("body parser error", func(t *testing.T) {
8989
p := &chatCompletionProcessorRouterFilter{
90-
tracer: tracing.NoopTracer[openai.ChatCompletionRequest, openai.ChatCompletionResponse, openai.ChatCompletionResponseChunk]{},
90+
tracer: tracingapi.NoopTracer[openai.ChatCompletionRequest, openai.ChatCompletionResponse, openai.ChatCompletionResponseChunk]{},
9191
config: &filterapi.RuntimeConfig{},
9292
}
9393
_, err := p.ProcessRequestBody(t.Context(), &extprocv3.HttpBody{Body: []byte("nonjson")})
@@ -100,7 +100,7 @@ func Test_chatCompletionProcessorRouterFilter_ProcessRequestBody(t *testing.T) {
100100
config: &filterapi.RuntimeConfig{},
101101
requestHeaders: headers,
102102
logger: slog.Default(),
103-
tracer: tracing.NoopTracer[openai.ChatCompletionRequest, openai.ChatCompletionResponse, openai.ChatCompletionResponseChunk]{},
103+
tracer: tracingapi.NoopTracer[openai.ChatCompletionRequest, openai.ChatCompletionResponse, openai.ChatCompletionResponseChunk]{},
104104
}
105105
resp, err := p.ProcessRequestBody(t.Context(), &extprocv3.HttpBody{Body: bodyFromModel(t, "some-model", false, nil)})
106106
require.NoError(t, err)
@@ -159,7 +159,7 @@ func Test_chatCompletionProcessorRouterFilter_ProcessRequestBody(t *testing.T) {
159159
},
160160
requestHeaders: headers,
161161
logger: slog.Default(),
162-
tracer: tracing.NoopTracer[openai.ChatCompletionRequest, openai.ChatCompletionResponse, openai.ChatCompletionResponseChunk]{},
162+
tracer: tracingapi.NoopTracer[openai.ChatCompletionRequest, openai.ChatCompletionResponse, openai.ChatCompletionResponseChunk]{},
163163
}
164164
resp, err := p.ProcessRequestBody(t.Context(), &extprocv3.HttpBody{Body: bodyFromModel(t, "some-model", true, opt)})
165165
require.NoError(t, err)

internal/json/json.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// The full text of the Apache license is available in the LICENSE file at
44
// the root of the repo.
55

6-
package json
6+
package json // nolint: revive
77

88
import (
99
"testing"

internal/mcpproxy/handlers.go

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
"github.com/envoyproxy/ai-gateway/internal/internalapi"
3131
"github.com/envoyproxy/ai-gateway/internal/json"
3232
"github.com/envoyproxy/ai-gateway/internal/metrics"
33-
tracing "github.com/envoyproxy/ai-gateway/internal/tracing/api"
33+
"github.com/envoyproxy/ai-gateway/internal/tracing/tracingapi"
3434
"github.com/envoyproxy/ai-gateway/internal/version"
3535
)
3636

@@ -185,7 +185,7 @@ func (m *MCPProxy) servePOST(w http.ResponseWriter, r *http.Request) {
185185
err error
186186
errType metrics.MCPErrorType
187187
requestMethod string
188-
span tracing.MCPSpan
188+
span tracingapi.MCPSpan
189189
params mcp.Params
190190
applicationError bool
191191
)
@@ -493,7 +493,7 @@ func errorType(err error) metrics.MCPErrorType {
493493
}
494494

495495
// handleInitializeRequest handles the "initialize" JSON-RPC method.
496-
func (m *MCPProxy) handleInitializeRequest(ctx context.Context, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.InitializeParams, route, subject string, span tracing.MCPSpan) error {
496+
func (m *MCPProxy) handleInitializeRequest(ctx context.Context, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.InitializeParams, route, subject string, span tracingapi.MCPSpan) error {
497497
m.metrics.RecordClientCapabilities(ctx, p.Capabilities, p)
498498
s, err := m.newSession(ctx, p, route, subject, span)
499499
if err != nil {
@@ -635,7 +635,7 @@ func (m *MCPProxy) handleClientToServerResponse(ctx context.Context, s *session,
635635
return m.proxyResponseBody(ctx, s, w, resp, nil, backend)
636636
}
637637

638-
func (m *MCPProxy) handleToolCallRequest(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.CallToolParams, span tracing.MCPSpan, r *http.Request) error {
638+
func (m *MCPProxy) handleToolCallRequest(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.CallToolParams, span tracingapi.MCPSpan, r *http.Request) error {
639639
backendName, toolName, err := upstreamResourceName(p.Name)
640640
if err != nil {
641641
onErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("invalid tool name %s: %v", p.Name, err))
@@ -1054,18 +1054,18 @@ func (m *MCPProxy) handleResourceReadRequest(ctx context.Context, s *session, w
10541054
}
10551055

10561056
// handleResourcesSubscribeRequest handles the "resources/subscribe" JSON-RPC method.
1057-
func (m *MCPProxy) handleResourcesSubscribeRequest(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.SubscribeParams, span tracing.MCPSpan) error {
1057+
func (m *MCPProxy) handleResourcesSubscribeRequest(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.SubscribeParams, span tracingapi.MCPSpan) error {
10581058
return m.handleResourcesSubscriptionRequest(ctx, s, w, req, p, span)
10591059
}
10601060

10611061
// handleResourcesUnsubscribeRequest handles the "resources/unsubscribe" JSON-RPC method.
1062-
func (m *MCPProxy) handleResourcesUnsubscribeRequest(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.UnsubscribeParams, span tracing.MCPSpan) error {
1062+
func (m *MCPProxy) handleResourcesUnsubscribeRequest(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.UnsubscribeParams, span tracingapi.MCPSpan) error {
10631063
return m.handleResourcesSubscriptionRequest(ctx, s, w, req, p, span)
10641064
}
10651065

10661066
func (m *MCPProxy) handleResourcesSubscriptionRequest(ctx context.Context, s *session, w http.ResponseWriter,
10671067
req *jsonrpc.Request, p interface{}, // *mcp.SubscribeParams or *mcp.UnsubscribeParams.
1068-
span tracing.MCPSpan,
1068+
span tracingapi.MCPSpan,
10691069
) error {
10701070
var uri string
10711071
switch v := p.(type) {
@@ -1217,7 +1217,7 @@ func (m *MCPProxy) handlePromptGetRequest(ctx context.Context, s *session, w htt
12171217
return m.invokeAndProxyResponse(ctx, s, w, backend, cse, req)
12181218
}
12191219

1220-
func (m *MCPProxy) handleCompletionComplete(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, param *mcp.CompleteParams, span tracing.MCPSpan) error {
1220+
func (m *MCPProxy) handleCompletionComplete(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, param *mcp.CompleteParams, span tracingapi.MCPSpan) error {
12211221
// Either one of Name or URI is non-empty, depending on the Ref.Type.
12221222
// https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/completion#reference-types
12231223
var (
@@ -1255,7 +1255,7 @@ func (m *MCPProxy) handleCompletionComplete(ctx context.Context, s *session, w h
12551255
// handleClientToServerNotificationsProgress handles client-to-server progress notifications that require routing to a specific backend.
12561256
//
12571257
// The progressToken contains the backend name and path prefix, so we can use that to route the notification to the correct backend.
1258-
func (m *MCPProxy) handleClientToServerNotificationsProgress(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.ProgressNotificationParams, span tracing.MCPSpan) error {
1258+
func (m *MCPProxy) handleClientToServerNotificationsProgress(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.ProgressNotificationParams, span tracingapi.MCPSpan) error {
12591259
pt, ok := p.ProgressToken.(string)
12601260
if !ok {
12611261
onErrorResponse(w, http.StatusBadRequest, fmt.Sprintf("invalid progressToken type %T", p.ProgressToken))
@@ -1380,7 +1380,7 @@ type (
13801380
// JSON-RPC methods that require sending the request to all backends and aggregating the responses.
13811381
//
13821382
// The mergeFn is used to merge the responses from all backends into a single response that will be sent back to the client.
1383-
func sendToAllBackendsAndAggregateResponses[responseType any, paramsType mcp.Params](ctx context.Context, m *MCPProxy, w http.ResponseWriter, s *session, request *jsonrpc.Request, p paramsType, mergeFn broadCastResponseMergeFn[responseType], span tracing.MCPSpan) error {
1383+
func sendToAllBackendsAndAggregateResponses[responseType any, paramsType mcp.Params](ctx context.Context, m *MCPProxy, w http.ResponseWriter, s *session, request *jsonrpc.Request, p paramsType, mergeFn broadCastResponseMergeFn[responseType], span tracingapi.MCPSpan) error {
13841384
encoded, _ := json.Marshal(p)
13851385
request.Params = encoded
13861386
backendMsgs := s.sendToAllBackends(ctx, http.MethodPost, request, span)
@@ -1464,7 +1464,7 @@ func sendToAllBackendsAndAggregateResponsesImpl[responseType any](ctx context.Co
14641464
}
14651465

14661466
// parseParamsAndMaybeStartSpan parses the params from the JSON-RPC request and starts a tracing span if params is non-nil.
1467-
func parseParamsAndMaybeStartSpan[paramType mcp.Params](ctx context.Context, m *MCPProxy, req *jsonrpc.Request, p paramType, headers http.Header) (tracing.MCPSpan, error) {
1467+
func parseParamsAndMaybeStartSpan[paramType mcp.Params](ctx context.Context, m *MCPProxy, req *jsonrpc.Request, p paramType, headers http.Header) (tracingapi.MCPSpan, error) {
14681468
if req.Params == nil {
14691469
return nil, nil
14701470
}
@@ -1481,33 +1481,33 @@ func parseParamsAndMaybeStartSpan[paramType mcp.Params](ctx context.Context, m *
14811481
// handleToolsListRequest handles the "tools/list" JSON-RPC method.
14821482
//
14831483
// This aggregates and returns the list of tools from all backends.
1484-
func (m *MCPProxy) handleToolsListRequest(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.ListToolsParams, span tracing.MCPSpan) error {
1484+
func (m *MCPProxy) handleToolsListRequest(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.ListToolsParams, span tracingapi.MCPSpan) error {
14851485
// TODO: use cursor for pagination, but in spec it's "SHOULD" not "MUST".
14861486
return sendToAllBackendsAndAggregateResponses(ctx, m, w, s, req, p, m.mergeToolsList, span)
14871487
}
14881488

14891489
// handleResourceListRequest handles the "resources/list" JSON-RPC method.
14901490
// This aggregates and returns the list of resources from all backends.
1491-
func (m *MCPProxy) handleResourceListRequest(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.ListResourcesParams, span tracing.MCPSpan) error {
1491+
func (m *MCPProxy) handleResourceListRequest(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.ListResourcesParams, span tracingapi.MCPSpan) error {
14921492
// TODO: use cursor for pagination, but in spec it's "SHOULD" not "MUST".
14931493
return sendToAllBackendsAndAggregateResponses(ctx, m, w, s, req, p, m.mergeResourceList, span)
14941494
}
14951495

14961496
// handleResourcesTemplatesListRequest handles the "resources/templates/list" JSON-RPC method.
1497-
func (m *MCPProxy) handleResourcesTemplatesListRequest(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.ListResourceTemplatesParams, span tracing.MCPSpan) error {
1497+
func (m *MCPProxy) handleResourcesTemplatesListRequest(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.ListResourceTemplatesParams, span tracingapi.MCPSpan) error {
14981498
// TODO: use cursor for pagination, but in spec it's "SHOULD" not "MUST".
14991499
return sendToAllBackendsAndAggregateResponses(ctx, m, w, s, req, p, m.mergeResourcesTemplateList, span)
15001500
}
15011501

15021502
// handlePromptListRequest handles the "prompts/list" JSON-RPC method.
15031503
// This aggregates and returns the list of prompts from all backends.
1504-
func (m *MCPProxy) handlePromptListRequest(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.ListPromptsParams, span tracing.MCPSpan) error {
1504+
func (m *MCPProxy) handlePromptListRequest(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, p *mcp.ListPromptsParams, span tracingapi.MCPSpan) error {
15051505
// TODO: use cursor for pagination, but in spec it's "SHOULD" not "MUST".
15061506
return sendToAllBackendsAndAggregateResponses(ctx, m, w, s, req, p, m.mergePromptsList, span)
15071507
}
15081508

15091509
// handleSetLoggingLevel handles the "logging/setLevel" JSON-RPC method.
1510-
func (m *MCPProxy) handleSetLoggingLevel(ctx context.Context, s *session, w http.ResponseWriter, originalRequest *jsonrpc.Request, p *mcp.SetLoggingLevelParams, span tracing.MCPSpan) error {
1510+
func (m *MCPProxy) handleSetLoggingLevel(ctx context.Context, s *session, w http.ResponseWriter, originalRequest *jsonrpc.Request, p *mcp.SetLoggingLevelParams, span tracingapi.MCPSpan) error {
15111511
// TODO: maybe some backend doesn't support set logging level, so filter out such backends.
15121512
return sendToAllBackendsAndAggregateResponses(ctx, m, w, s, originalRequest, p, func(*session, []broadCastResponse[any]) any {
15131513
return struct{}{}
@@ -1583,7 +1583,7 @@ func (m *MCPProxy) mergePromptsList(_ *session, responses []broadCastResponse[mc
15831583
}
15841584

15851585
// handleNotificationsRootsListChanged handles the "notifications/roots/list_changed" JSON-RPC method.
1586-
func (m *MCPProxy) handleNotificationsRootsListChanged(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, span tracing.MCPSpan) error {
1586+
func (m *MCPProxy) handleNotificationsRootsListChanged(ctx context.Context, s *session, w http.ResponseWriter, req *jsonrpc.Request, span tracingapi.MCPSpan) error {
15871587
// Since notifications request doesn't expect a response, we can just send the request to all backends and return 202 Accepted per the spec.
15881588
eventChan := s.sendToAllBackends(ctx, http.MethodPost, req, span)
15891589
w.Header().Set(sessionIDHeader, string(s.clientGatewaySessionID()))

0 commit comments

Comments
 (0)