MCPcopy Create free account
hub / github.com/coder/aibridge / newStream

Method newStream

intercept/responses/streaming.go:214–220  ·  view source on GitHub ↗
(ctx context.Context, srv responses.ResponseService, opts []option.RequestOption)

Source from the content-addressed store, hash-verified

212}
213
214func (i *StreamingResponsesInterceptor) newStream(ctx context.Context, srv responses.ResponseService, opts []option.RequestOption) *ssestream.Stream[responses.ResponseStreamEventUnion] {
215 ctx, span := i.tracer.Start(ctx, "Intercept.ProcessRequest.Upstream", trace.WithAttributes(tracing.InterceptionAttributesFromContext(ctx)...))
216 defer span.End()
217
218 // The body is overridden by option.WithRequestBody(reqPayload) in requestOptions
219 return srv.NewStreaming(ctx, responses.ResponseNewParams{}, opts...)
220}

Callers 1

ProcessRequestMethod · 0.95

Calls 2

StartMethod · 0.80

Tested by

no test coverage detected