#Ollama default model error

1 messages Β· Page 1 of 1 (latest)

outer sluiceBOT
#

Based on the documentation, here's how to troubleshoot and fix your Ollama default model issue:

πŸ” Enable Debug Logging

To see what's happening with Ollama, enable diagnostics flags:

Via environment variable (one-off):

export CLAWDBOT_DIAGNOSTICS="models.*,ollama.*"
# Or wildcard for everything:
export CLAWDBOT_DIAGNOSTICS="*"

Via config:

{
#
  "diagnostics": {
    "flags": ["models.*", "ollama.*"]
  }
}

Then restart the gateway and check logs:

tail -f /tmp/clawdbot/clawdbot-$(date +%F).log

πŸ”„ Reset Without Deleting Session

Instead of deleting the session, try these steps:

  1. Reload model configuration:
#
   clawdbot models list

This refreshes the model catalog and can resolve stale config issues.

  1. Restart just the gateway (preserves sessions):

    clawdbot gateway restart
    
  2. Use clawdbot doctor to diagnose:

    clawdbot doctor
    clawdbot status --all
    

⚠️ Common Ollama Pitfalls

#

From the docs, make sure:

  • βœ… OLLAMA_API_KEY is set (any value works, e.g., "ollama-local")
  • βœ… You don't have an explicit models.providers.ollama entry if you want auto-discovery
  • βœ… Ollama is running: curl http://localhost:11434/api/tags
  • βœ… Models report tool capability (only tool-capable models are auto-discovered)

πŸ“– Relevant Docs

Pro tip: If you're still having issues after trying the above, run clawdbot --version and share it along with the diagnostic logs β€” version mismatches are a common cause of weird behavior! 🦐

autumn rampart
#

2026.1.24-3 is the version. How do i set the API key for ollama? Is there a file i need to navigate to

outer sluiceBOT
#

Then restart the gateway:

clawdbot gateway restart

Option 2: Via CLI (easier)

clawdbot config set models.providers.ollama.apiKey "ollama-local"
clawdbot gateway restart

Option 3: Via Environment Variable

Add to your shell profile (~/.bashrc, ~/.zshrc, etc.):

#
export OLLAMA_API_KEY="ollama-local"

Then either source the file or restart your terminal, and restart the gateway.


Quickest path: Run this command:

clawdbot config set models.providers.ollama.apiKey "ollama-local" && clawdbot gateway restart

After that, verify Ollama is working:

clawdbot models list | grep ollama
autumn rampart
#

ok I put the key with the config set and that did not work. the models list shows the 7b and 14b qwen model

outer sluiceBOT
# autumn rampart ok I put the key with the config set and that did not work. the models list show...

Good, the models are showing! Now the issue is likely the model name format or a session cache problem.

Try This

1. Use the full model path (with ollama/ prefix)

When setting as default, make sure to include the provider prefix:

clawdbot config set agents.defaults.model.primary "ollama/qwen2.5:7b"

Or check exact model names:

clawdbot models list | grep ollama

2. Refresh the session without deleting

#

Instead of deleting the session, try:

# Reload config without full restart
clawdbot gateway restart

# Or force model reload in the existing session
/session refresh

3. Check if the model is actually loaded in Ollama

ollama list

If it's not showing, pull it:

#
ollama pull qwen2.5:7b

4. Enable debug logging to see what's failing

export CLAWDBOT_DIAGNOSTICS="models.*,ollama.*"
clawdbot gateway restart
# Then check logs
tail -f /tmp/clawdbot/clawdbot-$(date +%F).log

What happens when you try to use the model? Does it error out, or does it just fall back to another model? Share what you see and we can dig deeper!

autumn rampart
#

nothing happens i just get the elipisis constantly

outer sluiceBOT
# autumn rampart nothing happens i just get the elipisis constantly

Ellipsis = model is trying to respond but hanging. Let's diagnose:

Quick Debug Steps

1. Check if Ollama is responding

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

Should return JSON with your models. If it hangs or errors, Ollama isn't running.

2. Test Ollama directly

curl -X POST http://localhost:11434/api/generate -d '{"model":"qwen2.5:7b","prompt":"hi","stream":false}'

3. Check gateway logs for errors

#
# With debug flags enabled
export CLAWDBOT_DIAGNOSTICS="*"
tail -f /tmp/clawdbot/clawdbot-$(date +%F).log

Then try to use the model and watch for errors.

4. Verify model name format

clawdbot models list | grep qwen

Make sure you're using the exact name shown (e.g., ollama/qwen2.5:7b not just qwen2.5:7b)


#

Common Fixes

If Ollama isn't running:

ollama serve

If the model name is wrong:

# List actual Ollama models
ollama list

# Update default model to match exactly
clawdbot config set agents.defaults.model.primary "ollama/EXACT_NAME_FROM_LIST"

#

Can you run the curl command and share what it returns? That'll tell us if Ollama is the issue or if it's Clawdbot's connection to Ollama.

autumn rampart
#

⚠️ Agent failed before reply: No API key found for provider "ollama". Auth store: /Users/spencercallbeck/.clawdbot/agents/main/agent/auth-profiles.json (agentDir: /Users/spencercallbeck/.clawdbot/agents/main/agent). Configure auth for this agent (clawdbot agents add <id>) or copy auth-profiles.json from the main agentDir.
Logs: clawdbot logs --follow

I get this now

outer sluiceBOT
# autumn rampart ⚠️ Agent failed before reply: No API key found for provider "ollama". Auth store...

Found it! 🎯

The issue is agent-specific auth. You have the API key set in the main config, but this specific agent needs its own auth profile.

Fix It

Option 1: Copy auth from main agent (quickest)

cp ~/.clawdbot/agents/main/agent/auth-profiles.json ~/.clawdbot/agents/main/agent/auth-profiles.json

(replace main with the actual agent name if different)

Option 2: Add auth profile to the agent

clawdbot agents add ollama --api-key "ollama-local"
#

Then restart the gateway:

clawdbot gateway restart

Why This Happens

Clawdbot stores API keys per-agent in auth-profiles.json. Your global config sets defaults, but when an agent runs, it looks for its own credentials. That's why one agent works and another doesn't.

Docs: https://docs.clawd.bot/concepts/auth-profiles

autumn rampart
#

cp ~/.clawdbot/agents/main/agent/auth-profiles.json ~/.clawdbot/agents/main/agent/auth-profiles.json

#

this says the files are identical

#

clawdbot agents add ollama --api-key "ollama-local" this says unknown --api-key

outer sluiceBOT
# autumn rampart this says the files are identical

The files are identical because you're copying to the same location! The error path shows it's looking at that exact file.

Check what's actually IN the file

cat ~/.clawdbot/agents/main/agent/auth-profiles.json

Does it have an ollama entry? If not, that's the problem.

Add the Ollama auth properly

clawdbot agents add ollama --api-key "ollama-local"

This will write the correct entry to the auth-profiles.json file.

#

Or manually edit the file

# View current contents
cat ~/.clawdbot/agents/main/agent/auth-profiles.json

# Then edit to add ollama entry:
clawdbot agents edit ollama --api-key "ollama-local"

What does your current auth-profiles.json contain? Share the output and we'll see what's missing.

autumn rampart
#

Where is the clawdbot folder on Mac. I have a users folder with clawd but no clawdbot

outer sluiceBOT
#

Based on your error message:

/Users/spencercallbeck/.clawdbot/agents/main/agent/auth-profiles.json

So you should look at:

/Users/spencercallbeck/.clawdbot/agents/main/agent/

Use Finder β†’ Go β†’ Go to Folder (or press Cmd+Shift+G) and paste that path.


Once you're there, can you:

  1. Open auth-profiles.json
  2. Tell me what's inside?
#

That'll show if the ollama entry is actually there or not.

autumn rampart
#

Ok I’m there have an entropic and google default

outer sluiceBOT
# autumn rampart Ok I’m there have an entropic and google default

Found it! The file is missing the ollama entry β€” that's why it's failing.

Add the Ollama entry

Option 1: Use CLI (easiest)

clawdbot agents add ollama --api-key "ollama-local"

Option 2: Manually edit the file

Open auth-profiles.json and add ollama to the providers section. It should look like:

{
  "providers": {
#
    "entropic": { ... },
    "google": { ... },
    "ollama": {
      "apiKey": "ollama-local"
    }
  }
}

Then restart the gateway:

clawdbot gateway restart

#

After adding it, try using the model again. It should work! 🦐

autumn rampart
#

error: unknown option '--api-key'

outer sluiceBOT
# autumn rampart error: unknown option '--api-key'

The flag format is different. Let me check the correct syntax:

Try These Options

Option 1: Interactive (prompts for key)

clawdbot agents add ollama

Option 2: Check the help

clawdbot agents --help
clawdbot agents add --help

Option 3: Manual edit (edit the JSON file directly)

#

Open the file and add:

{
  "providers": {
    "ollama": {
      "apiKey": "ollama-local"
    }
  }
}

Save it, then restart the gateway:

clawdbot gateway restart

#

What does clawdbot agents add --help show? That'll give us the exact syntax.

autumn rampart
#

Workspace
Model
Agent-dir
Bind
Non-interactive
Json

#

That’s what the help shows