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

Method EffectiveModels

pkg/agent/agent.go:284–289  ·  view source on GitHub ↗

EffectiveModels returns the providers currently in effect for this agent: the runtime override(s) when set, otherwise the configured models. The returned slice is a copy and safe for the caller to retain or mutate.

()

Source from the content-addressed store, hash-verified

282// the runtime override(s) when set, otherwise the configured models. The
283// returned slice is a copy and safe for the caller to retain or mutate.
284func (a *Agent) EffectiveModels() []provider.Provider {
285 if overrides := a.modelOverrides.Load(); overrides != nil && len(*overrides) > 0 {
286 return slices.Clone(*overrides)
287 }
288 return slices.Clone(a.models)
289}
290
291// FallbackModels returns the fallback models to try if the primary model fails.
292func (a *Agent) FallbackModels() []provider.Provider {

Callers 2

agentThinkingLabelMethod · 0.80

Calls 2

LoadMethod · 0.80
CloneMethod · 0.45

Tested by

no test coverage detected