Skip to content

image tool returns 'Unknown model' for configured ollama models with image input #59943

@ghost

Description

Bug Description

The built-in image tool fails with Unknown model error when using ollama models that are configured with image input support.

Environment

  • OpenClaw Version: 2026.4.2
  • OS: Linux (Ubuntu)
  • Node: v25.9.0

Steps to Reproduce

  1. Configure agents.defaults.imageModel.primary to an ollama model with image support:

    "imageModel": {
      "primary": "ollama/qwen3.5:397b-cloud"
    }
  2. Verify model is configured and supports images:

    $ openclaw models status
    Image model   : qwen3.5:397b-cloud
    
    $ openclaw models list --all | grep qwen
    ollama/qwen3.5:397b-cloud                  text+image 256k     yes   no    fallback#1,configured,alias:qwen
  3. Use the image tool with an image URL or file:

    image prompt="Describe this image" image="https://example.com/image.jpg"
    

Expected Behavior

The image tool should analyze the image using the configured model.

Actual Behavior

{
  "status": "error",
  "tool": "image",
  "error": "Unknown model: ollama/qwen3.5:397b-cloud"
}

Additional Context

  • Also tested with ollama/kimi-k2.5:cloud — same error
  • Both models show text+image input support in models list --all
  • MCP Vision (gemini.analyze_media) works correctly for image analysis
  • Model is listed as configured in models status

Workaround

Using MCP Vision with Gemini:

mcporter call gemini.analyze_media --args '{"media_source": "<URL>", "prompt": "..."}'

Investigation

The issue appears to be in how the image tool resolves the model reference. The model is properly configured in openclaw.json and shows up in models status, but the tool doesn't recognize it.

"models": {
  "providers": {
    "ollama": {
      "models": [
        {
          "id": "qwen3.5:397b-cloud",
          "input": ["text", "image"],
          ...
        }
      ]
    }
  }
}

The imageModel.primary value of qwen3.5:397b-cloud (without ollama/ prefix) matches the status output but the error shows ollama/qwen3.5:397b-cloud (with prefix), suggesting a normalization mismatch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions