Skip to content

Ollama provider fails auth check despite not requiring API key #3740

@houstontxguy

Description

@houstontxguy

Bug Description

Clawdbot fails to use Ollama as a model provider because the auth system requires an API key, even though Ollama doesn't need one.

Error Message

FailoverError: No API key found for provider "ollama". Auth store: /Users/avoges/.clawdbot/agents/main/agent/auth-profiles.json (agentDir: /Users/avoges/.clawdbot/agents/main/agent). Configure auth for this agent (clawdbot agents add <id>) or copy auth-profiles.json from the main agentDir.

Steps to Reproduce

  1. Configure Ollama as a provider in clawdbot.json:
"models": {
  "providers": {
    "ollama": {
      "baseUrl": "http://localhost:11434/v1",
      "api": "openai-completions",
      "models": [...]
    }
  }
}
  1. Set Ollama model as primary:
"model": {
  "primary": "ollama/qwen3:14b",
  "fallbacks": ["anthropic/claude-opus-4-5"]
}
  1. Send a message — Clawdbot immediately falls back to Anthropic because the Ollama auth check fails.

Expected Behavior

Clawdbot should recognize that local/self-hosted providers like Ollama don't require API keys and skip the auth check, or allow a config option like authRequired: false.

Workaround

Manually add a dummy token to auth-profiles.json:

"ollama:local": {
  "type": "token",
  "provider": "ollama",
  "token": "not-required"
}

And add to lastGood:

"ollama": "ollama:local"

Environment

  • Clawdbot version: 2026.1.24-3
  • Ollama: running locally on port 11434
  • macOS (Darwin 25.2.0 arm64)

Suggested Fix

Either:

  1. Allow authRequired: false in provider config
  2. Auto-detect local providers (localhost URLs) and skip auth
  3. Have clawdbot setup prompt for this when configuring Ollama

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