(model provider.Provider)
| 54 | } |
| 55 | |
| 56 | func WithModel(model provider.Provider) Opt { |
| 57 | return func(a *Agent) { |
| 58 | a.models = append(a.models, model) |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | // WithFallbackModel adds a fallback model to try if the primary model fails. |
| 63 | // For retryable errors (5xx, timeouts), the same model is retried with backoff. |
no outgoing calls