MCPcopy Index your code
hub / github.com/coder/coder / newStream

Method newStream

aibridge/intercept/messages/streaming.go:685–691  ·  view source on GitHub ↗

newStream traces svc.NewStreaming() call.

(ctx context.Context, svc anthropic.MessageService, extraOpts ...option.RequestOption)

Source from the content-addressed store, hash-verified

683
684// newStream traces svc.NewStreaming() call.
685func (i *StreamingInterception) newStream(ctx context.Context, svc anthropic.MessageService, extraOpts ...option.RequestOption) *ssestream.Stream[anthropic.MessageStreamEventUnion] {
686 _, span := i.tracer.Start(ctx, "Intercept.ProcessRequest.Upstream", trace.WithAttributes(tracing.InterceptionAttributesFromContext(ctx)...))
687 defer span.End()
688
689 opts := append([]option.RequestOption{i.withBody()}, extraOpts...)
690 return svc.NewStreaming(ctx, anthropic.MessageNewParams{}, opts...)
691}

Callers 1

ProcessRequestMethod · 0.95

Calls 3

withBodyMethod · 0.80
StartMethod · 0.65

Tested by

no test coverage detected