#Moltbot can't call the models from local Ollama server.

1 messages ยท Page 1 of 1 (latest)

bronze nacelle
#

I have run Ollama correctly and pulled a model called qwen3-instruct-4b. The model also runs well.

โžœ  ~ ollama ls
NAME                        ID              SIZE      MODIFIED       
azure99/blossom-v6.3:8b     5a46816feefc    5.0 GB    47 minutes ago    
qwen3-instruct-8b:latest    73091d6b5cfe    5.0 GB    55 minutes ago    
qwen3-instruct-4b:latest    5611a5f21404    2.5 GB    56 minutes ago   
โžœ  ~ ollama run qwen3-instruct-4b
>>> Send a message (/? for help)

But Moltbot shows an error log like โฌ‡๏ธ. Please help me find the issue. Thanks a lot. ๐ŸŒน

10:58:34 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=main durationMs=1 error="Error: Unknown model: ollama/qwen3-instruct-4b:latest"
10:58:34 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=session:agent:main:main durationMs=2 error="Error: Unknown model: ollama/qwen3-instruct-4b:latest"
10:58:34 error Embedded agent failed before reply: Unknown model: ollama/qwen3-instruct-4b:latest

My English level is so poor. If I said some wrong/rude words, it's truly not my originally mean. ๐Ÿ™

soft starBOT
# bronze nacelle I have run Ollama correctly and pulled a model called qwen3-instruct-4b. The mod...

Hey Ryan! Your English is perfectly fine โ€” no worries at all! ๐ŸŒน

The issue is likely that Moltbot can't detect your Ollama model. Based on the docs, here's what to check:

Quick Checklist

1. Set the Ollama API key (required for auto-discovery):

export OLLAMA_API_KEY="ollama-local"

Or add to your Moltbot config:

moltbot config set models.providers.ollama.apiKey "ollama-local"

2. Verify Ollama is running:

#
curl http://localhost:11434/api/tags

3. Check if Moltbot sees your models:

moltbot models list

The Likely Problem

Moltbot auto-discovers models only if they report tool capability. Some models (especially smaller ones like 4B variants) might not report tool support, so Moltbot ignores them.

Solutions:

  • Use a larger model that supports tools, OR
  • Define the model explicitly in your config:
#
{
  "models": {
    "providers": {
      "ollama": {
        "apiKey": "ollama-local",
        "baseUrl": "http://localhost:11434/v1",
        "models": [
          {
            "id": "qwen3-instruct-4b",
            "name": "Qwen 3 4B",
            "reasoning": false,
            "input": ["text"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 8192,
            "maxTokens": 81920
#
          }
        ]
      }
    }
  }
}

Then set it as your default model:

moltbot config set agents.defaults.model.primary "ollama/qwen3-instruct-4b"

Docs Reference

Full Ollama setup guide: https://docs.molt.bot/providers/ollama