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

Function withProvider

internal/integrationtest/setupbridge.go:87–93  ·  view source on GitHub ↗

withProvider adds a default-configured provider of the given type. When any provider option is used, the default "all providers" set is not created.

(providerType string)

Source from the content-addressed store, hash-verified

85// withProvider adds a default-configured provider of the given type.
86// When any provider option is used, the default "all providers" set is not created.
87func withProvider(providerType string) bridgeOption {
88 return func(c *bridgeConfig) {
89 c.providerBuilders = append(c.providerBuilders, func(addr string) aibridge.Provider {
90 return newDefaultProvider(providerType, addr)
91 })
92 }
93}
94
95// withCustomProvider adds a pre-built provider. The upstream URL passed to
96// [newBridgeTestServer] is ignored for this provider.

Callers 4

TestSessionIDTrackingFunction · 0.85
TestTraceAnthropicFunction · 0.85
TestTraceAnthropicErrFunction · 0.85
TestInjectedToolsTraceFunction · 0.85

Calls 1

newDefaultProviderFunction · 0.85

Tested by 4

TestSessionIDTrackingFunction · 0.68
TestTraceAnthropicFunction · 0.68
TestTraceAnthropicErrFunction · 0.68
TestInjectedToolsTraceFunction · 0.68