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

Function fantasyConfigForAIBridge

coderd/x/chatd/model_routing_aibridge.go:187–210  ·  view source on GitHub ↗
(providerType database.AIProviderType)

Source from the content-addressed store, hash-verified

185}
186
187func fantasyConfigForAIBridge(providerType database.AIProviderType) aibridgeFantasyConfig {
188 var fantasyProvider string
189 baseURL := aibridgeLocalBaseURL + "/v1"
190 switch providerType {
191 case database.AiProviderTypeAnthropic, database.AiProviderTypeBedrock:
192 fantasyProvider = fantasyanthropic.Name
193 baseURL = aibridgeLocalBaseURL
194 case database.AiProviderTypeOpenai:
195 fantasyProvider = fantasyopenai.Name
196 default:
197 fantasyProvider = fantasyopenaicompat.Name
198 }
199 return aibridgeFantasyConfig{
200 ProviderHint: fantasyProvider,
201 Keys: chatprovider.ProviderAPIKeys{
202 ByProvider: map[string]string{
203 fantasyProvider: aibridgePlaceholderAPIKey,
204 },
205 BaseURLByProvider: map[string]string{
206 fantasyProvider: baseURL,
207 },
208 },
209 }
210}
211
212func aiGatewayRequestFormatForProviderType(providerType database.AIProviderType) aiGatewayRequestFormat {
213 switch providerType {

Callers 2

newAIGatewayModelMethod · 0.85

Calls

no outgoing calls

Tested by 1