MCPcopy Create free account
hub / github.com/docker/docker-agent / WithFallbackCooldown

Function WithFallbackCooldown

pkg/agent/opts.go:80–84  ·  view source on GitHub ↗

WithFallbackCooldown sets the duration to stick with a successful fallback model before retrying the primary. Only applies after a non-retryable error (e.g., 429).

(cooldown time.Duration)

Source from the content-addressed store, hash-verified

78// WithFallbackCooldown sets the duration to stick with a successful fallback model
79// before retrying the primary. Only applies after a non-retryable error (e.g., 429).
80func WithFallbackCooldown(cooldown time.Duration) Opt {
81 return func(a *Agent) {
82 a.fallbackCooldown = cooldown
83 }
84}
85
86// WithTitleModel sets a dedicated model for session-title generation, letting
87// a heavyweight primary model delegate the cheap title call to a smaller one.

Callers 2

TestGetEffectiveCooldownFunction · 0.92
LoadWithConfigFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestGetEffectiveCooldownFunction · 0.74