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

Method newMessage

aibridge/intercept/messages/blocking.go:347–353  ·  view source on GitHub ↗

newMessage routes between BYOK (single attempt) and centralized failover.

(ctx context.Context, svc anthropic.MessageService)

Source from the content-addressed store, hash-verified

345// newMessage routes between BYOK (single attempt) and centralized
346// failover.
347func (i *BlockingInterception) newMessage(ctx context.Context, svc anthropic.MessageService) (*anthropic.Message, error) {
348 // BYOK: single attempt, no failover.
349 if i.cfg.KeyPool == nil {
350 return i.newMessageWithKey(ctx, svc)
351 }
352 return i.newMessageWithKeyFailover(ctx, svc)
353}
354
355// newMessageWithKey performs a single upstream call.
356func (i *BlockingInterception) newMessageWithKey(ctx context.Context, svc anthropic.MessageService, extraOpts ...option.RequestOption) (_ *anthropic.Message, outErr error) {

Callers 1

ProcessRequestMethod · 0.95

Calls 2

newMessageWithKeyMethod · 0.95

Tested by

no test coverage detected