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

Function getAgentModelID

pkg/runtime/runtime.go:1255–1263  ·  view source on GitHub ↗

getAgentModelID returns the model ID for an agent. The zero ID is returned when no model is configured.

(ctx context.Context, a *agent.Agent)

Source from the content-addressed store, hash-verified

1253// getAgentModelID returns the model ID for an agent. The zero ID is
1254// returned when no model is configured.
1255func getAgentModelID(ctx context.Context, a *agent.Agent) modelsdev.ID {
1256 if a == nil {
1257 return modelsdev.ID{}
1258 }
1259 if model := a.Model(ctx); model != nil {
1260 return model.ID()
1261 }
1262 return modelsdev.ID{}
1263}
1264
1265// getEffectiveModelID returns the currently active model ID for an agent, accounting
1266// for any active fallback cooldown. During a cooldown period, this returns the fallback

Callers 2

agentModelLabelFunction · 0.85
getEffectiveModelIDMethod · 0.85

Calls 2

ModelMethod · 0.80
IDMethod · 0.65

Tested by

no test coverage detected