Skip to main content

meerkat_core/
model_defaults.rs

1//! Core-owned trait seam for model operational defaults lookup.
2//!
3//! `meerkat-core` must not depend on `meerkat-models`. This trait allows
4//! the facade/factory layer to inject model-aware operational defaults
5//! (e.g., profile-derived call timeouts) into the agent at build time.
6//!
7//! The resolver is invoked at **call time** (not build time) so that
8//! hot-swapped model/provider identity is reflected in the resolved defaults.
9
10use std::time::Duration;
11
12/// Resolver for model-specific operational defaults.
13///
14/// Implemented by the facade/factory layer using `meerkat-models::profile::profile_for(...)`.
15/// Injected into the agent at build time and consulted at each LLM call to resolve
16/// profile-derived defaults for the current effective model/provider.
17pub trait ModelOperationalDefaultsResolver: Send + Sync {
18    /// Return the profile-derived default call timeout for the given model/provider,
19    /// or `None` if the model is unknown or has no profiled default.
20    fn call_timeout_for(&self, provider: &str, model: &str) -> Option<Duration>;
21}