Activity
Mon
Wed
Fri
Sun
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Feb
Mar
What is this?
Less
More

Memberships

Agent Zero

2.4k members • Free

David Ondrej Inner Circle

42 members • Free

New Society

370 members • $37/m

3 contributions to Agent Zero
Agent Zero utility model crashes on history compression with Ollama — litellm 405 "method not allowed" on /api/generate
Setup: Agent Zero latest image (agent0ai/agent-zero:latest), litellm 1.79.3 (bundled in container), Chat model: Anthropic via OpenRouter (works fine), Utility model: switched to local Ollama (qwen3:32b on RTX 5090), Ollama runs on host, reachable from container via http://host.docker.internal:11434, The problem: Every time A0's conversation history gets long enough to trigger compression (_90_organize_history_wait.py → compress_attention → call_utility_model), it crashes with: litellm.APIConnectionError: OllamaException - 405 method not allowed URL: http://host.docker.internal:11434/api/generate The crash is fatal — kills the entire agent session. What I've verified: Ollama is healthy — curl -X POST http://host.docker.internal:11434/api/generate with a valid payload works perfectly from inside the A0 container, qwen3:32b is loaded and running on GPU (27GB VRAM, not CPU fallback), settings.json is correct:, "util_model_provider": "ollama", "util_model_name": "qwen3:32b", "util_model_api_base": "http://host.docker.internal:11434" Short tasks complete fine — the crash only happens when history is long enough to trigger the summarization/compression path, :thumbsup: Tried ollama as the provider(per the setup guide) -- same 405, Tried ollama_chat as provider — same 405, What I think is happening: litellm 1.79.3's Ollama provider is sending a malformed request to /api/generate — either wrong HTTP method, wrong content-type, or wrong payload format. Ollama's /api/generate endpoint returns 405 which means it's receiving a request it doesn't accept (likely a GET instead of POST, or missing required fields). The main chat model (Anthropic/OpenRouter) works because it never touches this code path. Only the utility model goes through the Ollama provider, and only during compression.
0 likes • 11h
SOLVED: Agent Zero utility model crashing on Ollama — litellm 405 "method not allowed" Found the fix. Posting for anyone else hitting this. The problem: litellm 1.79.3 (bundled in the A0 container) has a bug in its native ollama provider. When A0's history gets long enough to trigger compression, the utility model call to /api/generate sends a malformed request and Ollama returns 405 Method Not Allowed. This kills the entire agent session. The fix: Don't use litellm's ollama provider at all. Use Ollama's OpenAI-compatible API instead. In A0 Settings → Utility Model: Provider - OpenAI Compatible Model Name - qwen3:32b (or whatever you're running) API URL - http://host.docker.internal:11434/v1 API Key - ollama (any non-empty string — required by the OpenAI provider) Key details: • Note the /v1 at the end of the URL — this routes to Ollama's OpenAI-compatible endpoint • The API key field cannot be empty — the OpenAI provider requires something there. Just put ollama or none or any string • Same model, same GPU, same hardware — just a different request path that litellm handles correctly Why it works: Ollama exposes two APIs — its native /api/chat and /api/generate (which litellm's ollama provider targets and botches), and an OpenAI-compatible /v1/chat/completions (which litellm's openai provider handles perfectly). Bypassing the broken provider entirely solves it. Confirmed working with: A0 latest image, litellm 1.79.3, Ollama with qwen3:32b on RTX 5090, long agentic coding sessions with multiple compression cycles.
Why we are exactly in the right place at the right time 🚀
I highly recommend giving this video a watch. The stats he shares are mind-blowing: Big companies wasted $285 billion on AI last year simply because they don't know how to actually build with it. The biggest takeaway? Only 0.05% of the world actually knows how to use AI to produce real results—like asking AI how to build something and having it do the heavy lifting for you. This video perfectly validates everything we're doing here with Agent Zero. The world is splitting into "consumers" and "producers," and by learning to build autonomous agents, we are positioning ourselves in that top 0.05% of producers. I haven't fully mastered my A0 setup yet, but seeing this data makes the learning curve totally worth it. Keep building. (P.S. Please excuse the language in the video's thumbnail. I definitely don't endorse that kind of thing, but the data inside was just too relevant to our community not to share!)
1 like • 10d
wow. I just watched that. amazing to think we are such a small group. I FOMO all the time...
Welcome to Agent Zero community
And thank you for being here. If you have a minute to spare, say Hi and feel free to introduce yourself. Maybe share a picture of what you've acomplished with A0?
1 like • 11d
Hello Everyone, I am a professional pilot and use LLM all the time. I have built several projects and now want to explore using AgentZero to further improve my workflow.
1-3 of 3
Pilot Hobs
1
2points to level up
@hobson-black-8531
Pilot, investor and follower of the latest AI tech

Active 4h ago
Joined Mar 5, 2026
Powered by