Summary
Agent Zero v1.x silently routes utility_model calls to api.openai.com when
utility_model.api_base is an empty string (""). For users running NVIDIA NIM models (key prefix
nvapi-), this causes a repeated AuthenticationError flood on every background memory call.
Agent Zero correctly diagnosed the problem and attempted autonomous self-repair — adding try/except AuthenticationError guards to _50_recall_memories.py and _51_memorize_solutions.py. The logic
was correct, but the patch was written with 1-space Python indentation instead of 8-space,
causing an IndentationError on the next extension load. This blocked all agent responses
entirely.
Root Causes
utility_model.api_base: "" in _model_config/config.json → LiteLLM silent fallback to
api.openai.com
- Extension loader raises
IndentationError/SyntaxError globally — one broken file blocks ALL
extensions
- Self-repair has no
py_compile validation step before activating a patched file
Impact
- NVIDIA NIM users with
provider: openai + NVIDIA key + empty utility_model.api_base will see
repeated AuthenticationError in logs after every response
- If Agent Zero attempts autonomous self-repair, the indentation bug in the output causes complete
agent failure
- Memory recall and memorization silently fail or crash background threads throughout
Proposed Fixes
Full white paper, root cause analysis, corrected extension files, and A0's self-generated diagnostic
documents:
https://github.com/MrTrenchTrucker/agent-zero-nvidia-routing-fix
Short version:
- Config validator at startup — warn/error if
utility_model.api_base is empty or key prefix
mismatches endpoint
- Graceful extension loader — catch
IndentationError/SyntaxError per-extension, skip broken
file, continue loading others
- Self-repair safety — run
py_compile on patched files before activating, restore original on
failure
- Core AuthenticationError guard — the
nvapi- detection logic should live in core, not
patched per-file
Environment
- Agent Zero v1.x (
agent0ai/agent-zero:latest)
- LiteLLM with NVIDIA NIM (
provider: openai, api_base: https://integrate.api.nvidia.com/v1)
utility_model.api_base unset / empty string in _model_config/config.json
Verified Fix
Full recovery performed and confirmed. Post-recovery functional test: memory save/recall, sub-agent
delegation, and Docker socket access all passed. Corrected .py files with proper indentation +
AuthenticationError guards are in the repo above.
A fork with the code changes ready for review is at:
https://github.com/MrTrenchTrucker/agent-zero
Summary
Agent Zero v1.x silently routes
utility_modelcalls toapi.openai.comwhenutility_model.api_baseis an empty string (""). For users running NVIDIA NIM models (key prefixnvapi-), this causes a repeatedAuthenticationErrorflood on every background memory call.Agent Zero correctly diagnosed the problem and attempted autonomous self-repair — adding
try/except AuthenticationErrorguards to_50_recall_memories.pyand_51_memorize_solutions.py. The logicwas correct, but the patch was written with 1-space Python indentation instead of 8-space,
causing an
IndentationErroron the next extension load. This blocked all agent responsesentirely.
Root Causes
utility_model.api_base: ""in_model_config/config.json→ LiteLLM silent fallback toapi.openai.comIndentationError/SyntaxErrorglobally — one broken file blocks ALLextensions
py_compilevalidation step before activating a patched fileImpact
provider: openai+ NVIDIA key + emptyutility_model.api_basewill seerepeated
AuthenticationErrorin logs after every responseagent failure
Proposed Fixes
Full white paper, root cause analysis, corrected extension files, and A0's self-generated diagnostic
documents:
https://github.com/MrTrenchTrucker/agent-zero-nvidia-routing-fix
Short version:
utility_model.api_baseis empty or key prefixmismatches endpoint
IndentationError/SyntaxErrorper-extension, skip brokenfile, continue loading others
py_compileon patched files before activating, restore original onfailure
nvapi-detection logic should live in core, notpatched per-file
Environment
agent0ai/agent-zero:latest)provider: openai,api_base: https://integrate.api.nvidia.com/v1)utility_model.api_baseunset / empty string in_model_config/config.jsonVerified Fix
Full recovery performed and confirmed. Post-recovery functional test: memory save/recall, sub-agent
delegation, and Docker socket access all passed. Corrected
.pyfiles with proper indentation +AuthenticationError guards are in the repo above.
A fork with the code changes ready for review is at:
https://github.com/MrTrenchTrucker/agent-zero