EffectiveModels returns the providers currently in effect for this agent: the runtime override(s) when set, otherwise the configured models. The returned slice is a copy and safe for the caller to retain or mutate.
()
| 282 | // the runtime override(s) when set, otherwise the configured models. The |
| 283 | // returned slice is a copy and safe for the caller to retain or mutate. |
| 284 | func (a *Agent) EffectiveModels() []provider.Provider { |
| 285 | if overrides := a.modelOverrides.Load(); overrides != nil && len(*overrides) > 0 { |
| 286 | return slices.Clone(*overrides) |
| 287 | } |
| 288 | return slices.Clone(a.models) |
| 289 | } |
| 290 | |
| 291 | // FallbackModels returns the fallback models to try if the primary model fails. |
| 292 | func (a *Agent) FallbackModels() []provider.Provider { |
no test coverage detected