MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / endpointFromInput

Function endpointFromInput

internal/appapi/providers.go:282–302  ·  view source on GitHub ↗
(input ProviderInput)

Source from the content-addressed store, hash-verified

280}
281
282func endpointFromInput(input ProviderInput) providers.Endpoint {
283 supportedClient := input.SupportedClient
284 if supportedClient == "" && len(input.Clients) > 0 {
285 supportedClient = joinClients(input.Clients)
286 }
287 endpoint := providers.Endpoint{
288 Endpoint: input.Endpoint,
289 APIKey: input.APIKey,
290 APIKeyEnv: input.APIKeyEnv,
291 SupportedClient: supportedClient,
292 ListModelsCmd: input.ListModelsCmd,
293 Models: append([]string(nil), input.Models...),
294 KeepProxyConfig: input.KeepProxyConfig,
295 UseProxy: input.UseProxy,
296 Description: input.Description,
297 }
298 if input.Enabled != nil {
299 endpoint.Enabled = input.Enabled
300 }
301 return endpoint
302}
303
304func splitClients(raw string) []string {
305 return providers.Endpoint{SupportedClient: raw}.Clients()

Callers 1

AddMethod · 0.85

Calls 1

joinClientsFunction · 0.85

Tested by

no test coverage detected