Hmbown/CodeWhale · error

image inputs require an exact nonempty named model

Error message

image inputs require an exact nonempty named model

What it means

Turn admission for image inputs: images require an exact, non-empty named model (no 'auto' or inherited default), because image support is model-specific and cannot be safely guessed from a wildcard route.

Solutions

  1. Name the model explicitly (req.model or an exact configured model id) when sending image inputs.
  2. Send text-only input if the model cannot be resolved to an exact nonempty id.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/tui/src/runtime_threads.rs:9858 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/93589fb55cf2298d. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/runtime_threads.rs:9858

            {
                runtime_policy_with_overrides(
                    &thread,
                    req.mode.as_deref(),
                    req.permission_posture.as_deref(),
                    req.auto_approve,
                )?
            } else {
                RuntimePolicyProjection::from_persisted(
                    &thread.mode,
                    thread.permission_posture.as_deref(),
                    thread.auto_approve,
                )
            };
        let mode = policy.mode;
        let requested_model = req.model.as_deref().unwrap_or(&thread.model).to_string();
        let auto_model = requested_model.trim().eq_ignore_ascii_case("auto");
        if !image_blocks.is_empty() && (requested_model.is_empty() || requested_model.trim() != requested_model) {
            bail!("image inputs require an exact nonempty named model");
        }
        if !image_blocks.is_empty() && auto_model {
            bail!("image inputs require an exact named model with supported image input; Auto is unavailable for images");
        }
        let cfg_snapshot = self.config.read().clone();
        let configured_reasoning_preference = cfg_snapshot
            .reasoning_effort()
            .map(crate::reasoning_preference::ReasoningEffort::from_setting);
        // Runtime API precedence is explicit and stable: a turn override wins
        // over its persisted thread default, which wins over normal config.
        let reasoning_preference = turn_reasoning_preference
            .or(thread_reasoning_preference)
            .or(configured_reasoning_preference);
        let allow_shell = req.allow_shell.unwrap_or(thread.allow_shell);
        let trust_mode = req.trust_mode.unwrap_or(thread.trust_mode);
        let auto_approve = policy.auto_approve();
        let allowed_tools = req
            .allowed_tools

View on GitHub (pinned to 73e0f67d83)