getEffectiveCooldown returns the cooldown duration to use for an agent. Uses the agent's configured cooldown, or the default if not set.
(a *agent.Agent)
| 118 | // getEffectiveCooldown returns the cooldown duration to use for an agent. |
| 119 | // Uses the agent's configured cooldown, or the default if not set. |
| 120 | func getEffectiveCooldown(a *agent.Agent) time.Duration { |
| 121 | cooldown := a.FallbackCooldown() |
| 122 | if cooldown == 0 { |
| 123 | return modelerrors.DefaultCooldown |
| 124 | } |
| 125 | return cooldown |
| 126 | } |
| 127 | |
| 128 | // getEffectiveRetries returns the number of retries to use for the agent. |
| 129 | // If no retries are explicitly configured (retries == 0), returns |