Skip to content

Fix: Add AuthenticationError guard + correct indentation in memory extensions (NVIDIA NIM users)#1361

Open
MrTrenchTrucker wants to merge 2 commits intoagent0ai:mainfrom
MrTrenchTrucker:main
Open

Fix: Add AuthenticationError guard + correct indentation in memory extensions (NVIDIA NIM users)#1361
MrTrenchTrucker wants to merge 2 commits intoagent0ai:mainfrom
MrTrenchTrucker:main

Conversation

@MrTrenchTrucker
Copy link
Copy Markdown

Problem

Fixes #1360

For Agent Zero users running NVIDIA NIM models via LiteLLM (provider: openai with NVIDIA
api_base), an empty utility_model.api_base causes all utility model calls to route to
api.openai.com, which rejects the NVIDIA key with AuthenticationError.

Agent Zero may attempt to self-repair this by patching _50_recall_memories.py and
_51_memorize_solutions.py — but the patch can be written with incorrect indentation (1-space
instead of 8-space), causing IndentationError on extension load and blocking all agent
responses
.

Changes

  • _50_recall_memories.py: Fix indentation in memory_recall_query_prep block; add try/except AuthenticationError guard that detects nvapi- key on OpenAI endpoint and skips gracefully instead
    of crashing the background thread
  • _51_memorize_solutions.py: Fix indentation in call_utility_model try/except block; same
    AuthenticationError guard

Testing

Verified on Agent Zero v1.x with NVIDIA NIM (qwen/qwen3.5-122b) — memory recall and memorization
now skip cleanly with a log message instead of crashing when utility_model.api_base is
misconfigured.

Full incident report and white paper:
https://github.com/MrTrenchTrucker/agent-zero-nvidia-routing-fix

…IM users

Fixes IndentationError caused by self-repair patch with 1-space indentation.
Adds graceful AuthenticationError handling when nvapi- key is sent to OpenAI endpoint.
…IM users

Fixes IndentationError caused by self-repair patch with 1-space indentation.
Adds graceful AuthenticationError handling when nvapi- key is sent to OpenAI endpoint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: utility_model.api_base empty string causes AuthenticationError cascade + self-repair IndentationError (NVIDIA NIM users)

1 participant