pub fn sanitize_session_llm_override(
session_id: &str,
state: &mut SessionState,
global_llm_provider: &str,
is_model_compatible: impl Fn(&str, &str) -> bool,
) -> boolExpand description
Sanitize potentially invalid persisted (provider, model) overrides.
This is defensive against historic bug states such as provider=openai with a non-OpenAI
model value.
The is_model_compatible function is injected by the caller to avoid coupling this
crate to a specific validation implementation.
Returns true if any repair was applied.