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)
| 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). |
| 80 | func 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. |
no outgoing calls