Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Aider error

Aider: OllamaError: Error getting model info for ollama/qwen2.5-coder:32b

Error message
OllamaError: Error getting model info for ollama/qwen2.5-coder:32b. Set Ollama API Base via `OLLAMA_API_BASE` environment variable. Error: [Errno 61] Connection refused

Status: WorkaroundLast verified 2 documented fixes2 sources

What it means

Aider could not reach your Ollama server to fetch model info. The maintainer said aider used to swallow this Ollama exception, which showed up only as an "Unknown context window size" warning, and changed it to surface the error.

Causes

  • The Ollama server is not running, or OLLAMA_API_BASE is not set (maintainer, issue #2318: "You need to have your Ollama server running and your api base set.").

How to fix it

  1. Fix 1.

    Start the Ollama server. The docs show starting it with an 8k context window.

    TOML
    OLLAMA_CONTEXT_LENGTH=8192 ollama serve
  2. Fix 2.

    Set the API base.

    Terminal
    export OLLAMA_API_BASE=http://127.0.0.1:11434 # Mac/Linux
    setx   OLLAMA_API_BASE http://127.0.0.1:11434 # Windows, restart shell after setx

More Aider errors

All 17 Aider errors

FAQ

What does "OllamaError: Error getting model info for ollama/qwen2.5-coder:32b" mean in Aider?

Aider could not reach your Ollama server to fetch model info. The maintainer said aider used to swallow this Ollama exception, which showed up only as an "Unknown context window size" warning, and changed it to surface the error.

How do I fix "OllamaError: Error getting model info for ollama/qwen2.5-coder:32b"?

There are 2 documented fixes. Start with the first: Start the Ollama server. The docs show starting it with an 8k context window.

Is this Aider error fixed?

Status: Workaround. No release removes the cause. The documented fixes work around it. Affected versions: Surfaced explicitly since the Nov 2024 change in issue #2318.

Sources

Last verified against 2 sources: official docs, maintainer replies and release notes.

Newsletter

Fixes for the tools you use, weekly

One email per week. New coding agent releases, what broke, and how developers are working around it.