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

Function isOpenRouterLikeAIGatewayProvider

coderd/x/chatd/model_routing_aibridge.go:108–114  ·  view source on GitHub ↗
(provider database.AIProvider)

Source from the content-addressed store, hash-verified

106}
107
108func isOpenRouterLikeAIGatewayProvider(provider database.AIProvider) bool {
109 if strings.EqualFold(strings.TrimSpace(provider.Name), "openrouter") {
110 return true
111 }
112 host := chatprovider.ProviderBaseURLHostname(provider.BaseUrl)
113 return host == "openrouter.ai" || strings.HasSuffix(host, ".openrouter.ai")
114}
115
116func (p *Server) newAIGatewayModel(
117 _ context.Context,

Callers 1

Calls 1

ProviderBaseURLHostnameFunction · 0.92

Tested by

no test coverage detected