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

Method newStream

intercept/messages/streaming.go:588–593  ·  view source on GitHub ↗

newStream traces svc.NewStreaming() call.

(ctx context.Context, svc anthropic.MessageService)

Source from the content-addressed store, hash-verified

586
587// newStream traces svc.NewStreaming() call.
588func (i *StreamingInterception) newStream(ctx context.Context, svc anthropic.MessageService) *ssestream.Stream[anthropic.MessageStreamEventUnion] {
589 _, span := i.tracer.Start(ctx, "Intercept.ProcessRequest.Upstream", trace.WithAttributes(tracing.InterceptionAttributesFromContext(ctx)...))
590 defer span.End()
591
592 return svc.NewStreaming(ctx, anthropic.MessageNewParams{}, i.withBody())
593}

Callers 1

ProcessRequestMethod · 0.95

Calls 3

StartMethod · 0.80
withBodyMethod · 0.80

Tested by

no test coverage detected