openclaw - ✅(Solved) Fix tools.media with LiteLLM tier aliases (e.g. model=vision) is brittle / misleading [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#54865Fetched 2026-04-08 01:35:02
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1

tools.media appears to accept a LiteLLM tier alias like provider: "litellm", model: "vision", but in practice this is brittle / broken for image preprocessing. Using a direct provider (provider: "openai", model: "gpt-4o-mini") fixed the issue immediately in the same environment.

This is especially confusing because the OpenClaw app wrote litellm/vision-style config, so the resulting config looked valid.

Error Message

  1. OpenClaw should reject / warn on configs like: Reject or warn when tools.media uses LiteLLM tier aliases instead of direct providers or concrete models.

Option B: better error text

Root Cause

This is especially confusing because the OpenClaw app wrote litellm/vision-style config, so the resulting config looked valid.

Fix Action

Fixed

PR fix notes

PR #54872: config: reject LiteLLM routing aliases in tools.media

Description (problem / solution / changelog)

Summary

Reject LiteLLM routing aliases in tools.media config.

This blocks brittle configs like:

  • provider: "litellm", model: "vision"
  • provider: "litellm", model: "simple"
  • provider: "litellm", model: "medium"
  • provider: "litellm", model: "complex"

while still allowing:

  • direct providers like openai/gpt-4o-mini
  • concrete LiteLLM model ids like litellm/gpt-4o-mini

Why

tools.media is a sensitive path for image/audio/video preprocessing. LiteLLM routing aliases add a model-group indirection layer that is brittle here and led to confusing failures in real use. Failing loud at config-validation time is much better than letting users land in a broken runtime state.

Changes

  • add schema validation for LiteLLM routing aliases inside tools.media
  • add targeted tests for shared and capability-specific media model lists
  • update help text to steer users toward direct providers or concrete model ids

Test plan

  • pnpm exec vitest run src/config/tools-media-litellm-alias-validation.test.ts --reporter=dot

Closes #54865

Changed files

  • src/config/schema.help.ts (modified, +4/-3)
  • src/config/tools-media-litellm-alias-validation.test.ts (added, +95/-0)
  • src/config/zod-schema.core.ts (modified, +34/-0)

Code Example

{
  "tools": {
    "media": {
      "models": [{
        "provider": "litellm",
        "model": "vision",
        "capabilities": ["image"],
        "type": "provider",
        "maxBytes": 10485760,
        "timeoutSeconds": 60
      }]
    }
  },
  "agents": {
    "defaults": {
      "imageModel": {
        "primary": "litellm/vision"
      }
    }
  }
}

---

{
  "tools": {
    "media": {
      "models": [{
        "provider": "openai",
        "model": "gpt-4o-mini",
        "capabilities": ["image"],
        "type": "provider",
        "maxBytes": 10485760,
        "timeoutSeconds": 60
      }]
    }
  },
  "agents": {
    "defaults": {
      "imageModel": {
        "primary": "litellm/gpt-4o-mini"
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

Summary

tools.media appears to accept a LiteLLM tier alias like provider: "litellm", model: "vision", but in practice this is brittle / broken for image preprocessing. Using a direct provider (provider: "openai", model: "gpt-4o-mini") fixed the issue immediately in the same environment.

This is especially confusing because the OpenClaw app wrote litellm/vision-style config, so the resulting config looked valid.

Environment

  • OpenClaw: 2026.3.24
  • macOS
  • Main model: litellm/claude-sonnet-4-6
  • LiteLLM proxy configured with a vision model group that resolves to gpt-4o-mini

Problem

With this config:

{
  "tools": {
    "media": {
      "models": [{
        "provider": "litellm",
        "model": "vision",
        "capabilities": ["image"],
        "type": "provider",
        "maxBytes": 10485760,
        "timeoutSeconds": 60
      }]
    }
  },
  "agents": {
    "defaults": {
      "imageModel": {
        "primary": "litellm/vision"
      }
    }
  }
}

image understanding failed / was unreliable.

Switching only tools.media to a direct provider fixed it:

{
  "tools": {
    "media": {
      "models": [{
        "provider": "openai",
        "model": "gpt-4o-mini",
        "capabilities": ["image"],
        "type": "provider",
        "maxBytes": 10485760,
        "timeoutSeconds": 60
      }]
    }
  },
  "agents": {
    "defaults": {
      "imageModel": {
        "primary": "litellm/gpt-4o-mini"
      }
    }
  }
}

Why this seems like a product bug

Even if LiteLLM vision resolves to gpt-4o-mini, these are not equivalent paths:

  • provider=openai model=gpt-4o-mini → direct provider call
  • provider=litellm model=gpt-4o-mini → LiteLLM exact model target
  • provider=litellm model=vision → LiteLLM model-group alias + fallback machinery

For tools.media, that alias/group path seems unsafe or unsupported.

Expected behavior

One of these should happen:

  1. tools.media with LiteLLM tier aliases should work reliably, or
  2. OpenClaw should reject / warn on configs like:
    • provider=litellm model=vision
    • provider=litellm model=simple|medium|complex

Suggested fixes

Option A: validation / warning

Reject or warn when tools.media uses LiteLLM tier aliases instead of direct providers or concrete models.

Option B: better error text

Emit a clear message that tools.media should use a direct provider or a concrete LiteLLM model, not a tier alias.

Option C: app-side config generation

If the macOS/iOS app is generating this config, it should avoid writing provider=litellm model=vision into tools.media.

Notes

In our debugging session, replacing:

  • tools.media = litellm/vision

with:

  • tools.media = openai/gpt-4o-mini

resolved the problem immediately while keeping:

  • imageModel = litellm/gpt-4o-mini

So the problem appears specifically tied to tools.media + LiteLLM tier alias usage, not LiteLLM in general.

extent analysis

Fix Plan

To resolve the issue, we will implement Option A: validation / warning. We will modify the configuration validation to reject or warn when tools.media uses LiteLLM tier aliases instead of direct providers or concrete models.

Step-by-Step Solution

  1. Update configuration validation:
    • Check if tools.media uses a LiteLLM tier alias.
    • If it does, reject the configuration or emit a warning.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

One of these should happen:

  1. tools.media with LiteLLM tier aliases should work reliably, or
  2. OpenClaw should reject / warn on configs like:
    • provider=litellm model=vision
    • provider=litellm model=simple|medium|complex

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix tools.media with LiteLLM tier aliases (e.g. model=vision) is brittle / misleading [1 pull requests, 1 participants]