pub async fn maybe_preprocess(
config: &Config,
active_provider: &dyn LlmProvider,
caption: &str,
images: &[ImagePart],
) -> PreprocessOutcomeExpand description
Decide whether and how to preprocess images before a main-provider turn.
Short-circuit order (each → Skipped, except the last):
imagesis empty.- The active provider’s model name passes the
model_name_suggests_visionheuristic (it can handle the image natively). config.vision_preprocessor_providerisNoneorSome("").- The configured key is missing from
config.providers→Failed(this is a configuration mistake worth surfacing, not a silent skip).