fix(auxiliary): refresh Nous runtime credentials after aux 401s#13682
Merged
teknium1 merged 1 commit intoApr 21, 2026
Conversation
ce2fe7f to
318eec5
Compare
This was referenced Apr 21, 2026
19 tasks
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.
What does this PR do?
Fixes a real auth gap between the main Nous chat path and the auxiliary Nous path.
Before this change, the main agent could recover from Nous 401s by calling
resolve_nous_runtime_credentials()and minting a fresh agent key, but auxiliary calls inagent/auxiliary_client.pystill built Nous clients from raw stored auth state. That meant vision and other side-task calls could fail on stale Nous credentials even while the main chat path kept working.This PR aligns the auxiliary path with the main runtime auth flow and makes auxiliary Nous retries rebuild the cached client after a 401.
Related Issue
Fixes #
Type of Change
Changes Made
agent/auxiliary_client.pyso_try_nous()prefers fresh runtime credentials fromresolve_nous_runtime_credentials()instead of relying only on raw stored auth state.call_llm()andasync_call_llm().tests/agent/test_auxiliary_client.pycovering fresh runtime credential preference and both sync/async 401 retry behavior.How to Test
scripts/run_tests.shscripts/run_tests.sh tests/agent/test_crossloop_client_cache.pyscripts/run_tests.sh tests/agent/test_auxiliary_client.py tests/run_agent/test_provider_parity.py tests/hermes_cli/test_auth_nous_provider.pyChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/ARegression Notes
session_search,web_extract,vision_tools) and any provider-selection flow that explicitly pinsauxiliary.*.provider: nous.Screenshots / Logs
Local test status:
scripts/run_tests.shwas run with the repo's 4-worker wrapper and is currently red in this checkout due to unrelated existing failures outside this patch. The full run finished with27 failed, 14151 passed, 39 skipped.scripts/run_tests.sh tests/agent/test_crossloop_client_cache.py-> 5 passedscripts/run_tests.sh tests/agent/test_auxiliary_client.py tests/run_agent/test_provider_parity.py tests/hermes_cli/test_auth_nous_provider.py-> 179 passed