Fix: Add AuthenticationError guard + correct indentation in memory extensions (NVIDIA NIM users)#1361
Open
MrTrenchTrucker wants to merge 2 commits intoagent0ai:mainfrom
Open
Fix: Add AuthenticationError guard + correct indentation in memory extensions (NVIDIA NIM users)#1361MrTrenchTrucker wants to merge 2 commits intoagent0ai:mainfrom
MrTrenchTrucker wants to merge 2 commits intoagent0ai:mainfrom
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #1360
For Agent Zero users running NVIDIA NIM models via LiteLLM (
provider: openaiwith NVIDIAapi_base), an emptyutility_model.api_basecauses all utility model calls to route toapi.openai.com, which rejects the NVIDIA key withAuthenticationError.Agent Zero may attempt to self-repair this by patching
_50_recall_memories.pyand_51_memorize_solutions.py— but the patch can be written with incorrect indentation (1-spaceinstead of 8-space), causing
IndentationErroron extension load and blocking all agentresponses.
Changes
_50_recall_memories.py: Fix indentation inmemory_recall_query_prepblock; addtry/except AuthenticationErrorguard that detectsnvapi-key on OpenAI endpoint and skips gracefully insteadof crashing the background thread
_51_memorize_solutions.py: Fix indentation incall_utility_modeltry/except block; sameAuthenticationError guard
Testing
Verified on Agent Zero v1.x with NVIDIA NIM (
qwen/qwen3.5-122b) — memory recall and memorizationnow skip cleanly with a log message instead of crashing when
utility_model.api_baseismisconfigured.
Full incident report and white paper:
https://github.com/MrTrenchTrucker/agent-zero-nvidia-routing-fix