MCPcopy Index your code
hub / github.com/docker/docker-agent / WithModelSwitcherConfig

Function WithModelSwitcherConfig

pkg/runtime/model_switcher.go:896–908  ·  view source on GitHub ↗

WithModelSwitcherConfig sets the model switcher configuration for the runtime.

(cfg *ModelSwitcherConfig)

Source from the content-addressed store, hash-verified

894
895// WithModelSwitcherConfig sets the model switcher configuration for the runtime.
896func WithModelSwitcherConfig(cfg *ModelSwitcherConfig) Opt {
897 return func(r *LocalRuntime) {
898 if cfg != nil && cfg.ProviderRegistry == nil {
899 cfgCopy := *cfg
900 cfgCopy.ProviderRegistry = r.providerRegistry
901 cfg = &cfgCopy
902 }
903 if cfg != nil && cfg.ProviderRegistry != nil {
904 r.providerRegistry = cfg.ProviderRegistry
905 }
906 r.modelSwitcherCfg = cfg
907 }
908}

Callers 4

runtimeForSessionMethod · 0.92
runtimeOptsMethod · 0.92
newTUIFunction · 0.92

Calls

no outgoing calls

Tested by 2

newTUIFunction · 0.74