fix(moa): block the moa virtual provider as a reference or aggregator slot - #53281
Merged
Conversation
… slot A MoA preset whose reference or aggregator slot points at the moa virtual provider creates a recursive MoA tree. The runtime guards in moa_loop.py only surface this mid-turn (references silently skipped, aggregator raises). Reject it at the config chokepoint (_clean_slot) so it can never be saved, and hide it from the desktop/dashboard slot pickers so it isn't offered as a dead choice.
Contributor
🔎 Lint report:
|
| Rule | Count |
|---|---|
invalid-assignment |
1 |
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [invalid-assignment] invalid-assignment: Object of type `None` is not assignable to attribute `_credits_session_start_micros` of type `int`
✅ Fixed issues (2):
| Rule | Count |
|---|---|
unresolved-attribute |
2 |
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [unresolved-attribute] unresolved-attribute: Unresolved attribute `_credits_session_start_micros` on type `AIAgent`
run_agent.py:3002: [unresolved-attribute] unresolved-attribute: Object of type `Self@get_credits_spent_micros` has no attribute `_credits_session_start_micros`
Unchanged: 6037 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
pai-scaffolde
pushed a commit
to pai-scaffolde/hermes-agent
that referenced
this pull request
Jun 28, 2026
… slot (NousResearch#53281) A MoA preset whose reference or aggregator slot points at the moa virtual provider creates a recursive MoA tree. The runtime guards in moa_loop.py only surface this mid-turn (references silently skipped, aggregator raises). Reject it at the config chokepoint (_clean_slot) so it can never be saved, and hide it from the desktop/dashboard slot pickers so it isn't offered as a dead choice.
1 task
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
… slot (NousResearch#53281) A MoA preset whose reference or aggregator slot points at the moa virtual provider creates a recursive MoA tree. The runtime guards in moa_loop.py only surface this mid-turn (references silently skipped, aggregator raises). Reject it at the config chokepoint (_clean_slot) so it can never be saved, and hide it from the desktop/dashboard slot pickers so it isn't offered as a dead choice.
habarmc1223-sudo
pushed a commit
to habarmc1223-sudo/hermes-agent-fluxmem
that referenced
this pull request
Jul 8, 2026
… slot (NousResearch#53281) A MoA preset whose reference or aggregator slot points at the moa virtual provider creates a recursive MoA tree. The runtime guards in moa_loop.py only surface this mid-turn (references silently skipped, aggregator raises). Reject it at the config chokepoint (_clean_slot) so it can never be saved, and hide it from the desktop/dashboard slot pickers so it isn't offered as a dead choice.
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
… slot (NousResearch#53281) A MoA preset whose reference or aggregator slot points at the moa virtual provider creates a recursive MoA tree. The runtime guards in moa_loop.py only surface this mid-turn (references silently skipped, aggregator raises). Reject it at the config chokepoint (_clean_slot) so it can never be saved, and hide it from the desktop/dashboard slot pickers so it isn't offered as a dead choice.
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
… slot (NousResearch#53281) A MoA preset whose reference or aggregator slot points at the moa virtual provider creates a recursive MoA tree. The runtime guards in moa_loop.py only surface this mid-turn (references silently skipped, aggregator raises). Reject it at the config chokepoint (_clean_slot) so it can never be saved, and hide it from the desktop/dashboard slot pickers so it isn't offered as a dead choice.
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
… slot (NousResearch#53281) A MoA preset whose reference or aggregator slot points at the moa virtual provider creates a recursive MoA tree. The runtime guards in moa_loop.py only surface this mid-turn (references silently skipped, aggregator raises). Reject it at the config chokepoint (_clean_slot) so it can never be saved, and hide it from the desktop/dashboard slot pickers so it isn't offered as a dead choice.
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.
Summary
A MoA preset can currently be saved with the
moavirtual provider in a reference or aggregator slot, which creates a recursive MoA tree. The runtime guards inmoa_loop.pyonly catch this mid-turn (references silently skipped, aggregator raisesRuntimeError). This blocks it at the config chokepoint so it can never be saved, and hides it from the slot pickers.Changes
hermes_cli/moa_config.py:_clean_slot()rejectsprovider == "moa"(case-insensitive). Every save path (CLIhermes moa configure, dashboard PUT, desktop settings, hand-edited YAML) routes through this, so a moa reference is dropped (falls back to defaults) and a moa aggregator falls back to the default aggregator. Fail-closed.apps/desktop/src/app/settings/model-settings.tsx: MoA reference/aggregator provider dropdowns use a filtered list that excludes the moa row.web/src/pages/ModelsPage.tsx: the MoA model picker rejects a moa pick with an inline error.Verification
MOA/MoAcase variantsresolve_moa_preset(moa_loop consumer)tests/hermes_cli/test_moa_config.pyInfographic