agent-zero
agent-zero copied to clipboard
ollama 0.21 - LiteLLM error 405 method not allowed issue (a0 v 1.9)
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:
- Use litellm with provider ollama pointing to Ollama v0.21
- Attempt any chat completion
- 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
Rolled Back Ollama to version 0.20 - which DOES allow Gemma4 26b Model to run.
Closing due to inactivity of 90 days.