agent-zero icon indicating copy to clipboard operation
agent-zero copied to clipboard

ollama 0.21 - LiteLLM error 405 method not allowed issue (a0 v 1.9)

Open edhooksjr-ai opened this issue 7 months ago • 2 comments

Summary for Agent-Zero Bug Report: Issue: 405 method not allowed when Agent-Zero uses LiteLLM to connect to Ollama v0.21 Root Cause:

  • LiteLLM sends GET /api/chat to Ollama
  • Ollama v0.21 changed the API - /api/chat now only accepts POST (returns 405 Method Not Allowed with header Allow: POST)
  • This worked in Ollama v0.18/0.20 which allowed GET Reproduction:
  1. Use litellm with provider ollama pointing to Ollama v0.21
  2. Attempt any chat completion
  3. Error: OllamaError: 405 method not allowed Evidence:

From container:

curl -X GET http://omarchy:11434/api/chat

Returns: 405 Method Not Allowed, Allow: POST

Suggested Fix:

  • Update litellm to use POST for /api/chat instead of GET, OR
  • Add detection for Ollama version and use appropriate HTTP method Environment:
  • Host: Arch Linux, Ollama 0.21.0 ( Arch package + ROCm)
  • Agent-Zero: v1.9 Docker container with litellm

edhooksjr-ai avatar Apr 21 '26 18:04 edhooksjr-ai

Rolled Back Ollama to version 0.20 - which DOES allow Gemma4 26b Model to run.

edhooksjr-ai avatar Apr 21 '26 18:04 edhooksjr-ai

Closing due to inactivity of 90 days.

github-actions[bot] avatar Jul 21 '26 04:07 github-actions[bot]