openclaw - 💡(How to fix) Fix Image model cannot recognize LM Studio deployed models (qwen3-vl) [3 comments, 3 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#44496Fetched 2026-04-08 00:46:05
View on GitHub
Comments
3
Participants
3
Timeline
5
Reactions
0
Author
Timeline (top)
commented ×3subscribed ×1unsubscribed ×1

Error Message

  1. Error: Unknown model anthropic/qwen3-vl-30b-a3b-instruct-mlx
  2. System falls back to default provider anthropic, causing the error

Root Cause

The issue is in resolveImageModelFromAgentDefaults function:

  1. The config is correctly parsed: provider=lmstudio2, model=qwen3-vl-30b-a3b-instruct-mlx
  2. But in resolveAutoImageModel, the model catalog lookup fails to find lmstudio2 models
  3. System falls back to default provider anthropic, causing the error
RAW_BUFFERClick to expand / collapse

Bug Description

Image tool cannot recognize LM Studio deployed vision models (e.g., qwen3-vl-30b-a3b-instruct-mlx).

Steps to Reproduce

  1. Configure agents.defaults.imageModel.primary to use LM Studio model
  2. Try to use image analysis tool
  3. Error: Unknown model anthropic/qwen3-vl-30b-a3b-instruct-mlx

Root Cause

The issue is in resolveImageModelFromAgentDefaults function:

  1. The config is correctly parsed: provider=lmstudio2, model=qwen3-vl-30b-a3b-instruct-mlx
  2. But in resolveAutoImageModel, the model catalog lookup fails to find lmstudio2 models
  3. System falls back to default provider anthropic, causing the error

Expected Behavior

Image models from LM Studio should be properly recognized.

Environment

  • OpenClaw: latest
  • Model: qwen3-vl-30b-a3b-instruct-mlx via LM Studio
  • Provider: lmstudio2

extent analysis

Fix Plan

The fix involves updating the resolveAutoImageModel function to correctly handle LM Studio models.

  • Update the model catalog to include LM Studio models
  • Modify the resolveAutoImageModel function to check for LM Studio models before falling back to the default provider

Example code:

def resolveAutoImageModel(provider, model):
    # Check if provider is lmstudio2
    if provider == 'lmstudio2':
        # Check if model is in LM Studio catalog
        if model in lm_studio_catalog:
            return model
    # Fall back to default provider if not found
    return resolveImageModelFromAgentDefaults(provider, model)

# Update model catalog to include LM Studio models
lm_studio_catalog = {
    'qwen3-vl-30b-a3b-instruct-mlx': 'lmstudio2/qwen3-vl-30b-a3b-instruct-mlx',
    # Add other LM Studio models here
}

Verification

To verify the fix, follow these steps:

  • Configure agents.defaults.imageModel.primary to use the LM Studio model
  • Try to use the image analysis tool
  • Check that the error "Unknown model anthropic/qwen3-vl-30b-a3b-instruct-mlx" is no longer thrown

Extra Tips

  • Make sure to update the lm_studio_catalog dictionary with all available LM Studio models
  • Consider adding error handling to the resolveAutoImageModel function to handle cases where the model is not found in the catalog.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING