MCPcopy
hub / github.com/docker/docker-agent / ModelsDevStore

Method ModelsDevStore

pkg/config/runtime.go:108–118  ·  view source on GitHub ↗

ModelsDevStore returns the lazily-initialized models.dev store. The store is created on first access and shared across clones. If ModelsDevStoreOverride is set, it is returned directly.

()

Source from the content-addressed store, hash-verified

106// The store is created on first access and shared across clones.
107// If ModelsDevStoreOverride is set, it is returned directly.
108func (runConfig *RuntimeConfig) ModelsDevStore() (*modelsdev.Store, error) {
109 if runConfig.ModelsDevStoreOverride != nil {
110 return runConfig.ModelsDevStoreOverride, nil
111 }
112 runConfig.modelsDevStoreOnce.Do(func() {
113 runConfig.modelsDevStore, runConfig.modelsDevStoreErr = modelsdev.NewStore(
114 modelsdev.WithKnownProvider(provider.IsKnownProvider),
115 )
116 })
117 return runConfig.modelsDevStore, runConfig.modelsDevStoreErr
118}
119
120// ProviderRegistryOrDefault returns the configured provider registry, or the
121// package default registry when none was set (including when the receiver is

Callers 11

CloneMethod · 0.95
runtimeForSessionMethod · 0.45
CreateEmbeddingProviderFunction · 0.45
NewFunction · 0.45
LoadWithConfigFunction · 0.45
getModelsForAgentFunction · 0.45
getTitleModelForAgentFunction · 0.45
collectModelsMethod · 0.45
runtimeOptsMethod · 0.45

Calls 3

NewStoreFunction · 0.92
WithKnownProviderFunction · 0.92
DoMethod · 0.65

Tested by

no test coverage detected