MCPcopy Create free account
hub / github.com/coder/coder / detectProvider

Function detectProvider

coderd/x/chatd/chaterror/signals.go:125–132  ·  view source on GitHub ↗
(lower string)

Source from the content-addressed store, hash-verified

123}
124
125func detectProvider(lower string) string {
126 for _, hint := range providerHints {
127 if containsAny(lower, hint.patterns...) {
128 return hint.provider
129 }
130 }
131 return ""
132}
133
134func containsAny(lower string, patterns ...string) bool {
135 for _, pattern := range patterns {

Callers 2

DetectProviderForTestFunction · 0.85
ClassifyFunction · 0.85

Calls 1

containsAnyFunction · 0.85

Tested by 1

DetectProviderForTestFunction · 0.68