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

Method resolveModelRouteForConfig

coderd/x/chatd/model_routing.go:98–108  ·  view source on GitHub ↗
(
	ctx context.Context,
	ownerID uuid.UUID,
	modelConfig database.ChatModelConfig,
	fallbackKeys chatprovider.ProviderAPIKeys,
)

Source from the content-addressed store, hash-verified

96}
97
98func (p *Server) resolveModelRouteForConfig(
99 ctx context.Context,
100 ownerID uuid.UUID,
101 modelConfig database.ChatModelConfig,
102 fallbackKeys chatprovider.ProviderAPIKeys,
103) (resolvedModelRoute, error) {
104 if p.shouldUseAIGatewayRouting() {
105 return p.resolveAIGatewayModelRouteForConfig(ctx, ownerID, modelConfig)
106 }
107 return p.resolveDirectModelRouteForConfig(ctx, ownerID, modelConfig, fallbackKeys)
108}
109
110func (p *Server) resolveModelRouteForProviderType(
111 ctx context.Context,