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

Function logFallbackAttempt

pkg/runtime/fallback.go:92–107  ·  view source on GitHub ↗

logFallbackAttempt logs information about a fallback attempt

(agentName string, model modelWithFallback, attempt, maxRetries int, err error)

Source from the content-addressed store, hash-verified

90
91// logFallbackAttempt logs information about a fallback attempt
92func logFallbackAttempt(agentName string, model modelWithFallback, attempt, maxRetries int, err error) {
93 if model.isFallback {
94 slog.Warn("Fallback model attempt",
95 "agent", agentName,
96 "model", model.provider.ID().String(),
97 "fallback_index", model.index,
98 "attempt", attempt+1,
99 "max_retries", maxRetries+1,
100 "previous_error", err)
101 } else {
102 slog.Warn("Primary model failed, trying fallbacks",
103 "agent", agentName,
104 "model", model.provider.ID().String(),
105 "error", err)
106 }
107}
108
109// logRetryBackoff logs when we're backing off before a retry
110func logRetryBackoff(agentName string, modelID modelsdev.ID, attempt int, backoffDelay time.Duration) {

Callers 1

executeMethod · 0.85

Calls 3

WarnMethod · 0.80
IDMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected