MCPcopy Create free account
hub / github.com/InferCore/InferCore / NewBackend

Function NewBackend

internal/adapters/factory.go:14–29  ·  view source on GitHub ↗

NewBackend constructs a BackendAdapter for a backend config entry.

(backend config.BackendConfig)

Source from the content-addressed store, hash-verified

12
13// NewBackend constructs a BackendAdapter for a backend config entry.
14func NewBackend(backend config.BackendConfig) (interfaces.BackendAdapter, bool) {
15 switch backend.Type {
16 case "mock":
17 return mock.New(backend), true
18 case "vllm", "openai", "openai_compatible", "azure_openai":
19 return vllm.New(backend), true
20 case "anthropic":
21 return anthropic.New(backend), true
22 case "bedrock":
23 return bedrock.New(backend), true
24 case "gemini", "gemini_vertex":
25 return gemini.New(backend), true
26 default:
27 return nil, false
28 }
29}

Callers

nothing calls this directly

Calls 5

NewFunction · 0.92
NewFunction · 0.92
NewFunction · 0.92
NewFunction · 0.92
NewFunction · 0.92

Tested by

no test coverage detected