fix(gateway): show MoA presets in the gateway model picker - #53561
Merged
Conversation
Follow-up on the gateway-picker salvage: the cherry-picked change added a second copy of the MoA virtual-provider row in model_switch.py, duplicating inventory._moa_provider_row (same slug/name/preset-models, identical extra fields). Make _moa_provider_row take a bare current_provider string and reuse it from the gateway picker path so the row shape lives in one place and the two surfaces can't drift.
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
run_agent.py:3002: [unresolved-attribute] unresolved-attribute: Object of type `Self@get_credits_spent_micros` has no attribute `_credits_session_start_micros`
tests/run_agent/test_credits_notices_toggle.py:76: [unresolved-attribute] unresolved-attribute: Unresolved attribute `_credits_session_start_micros` on type `AIAgent`
Unchanged: 6031 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
19 tasks
1 task
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
MoA presets now appear in the gateway
/modelpicker (Telegram/Discord inline keyboards). The gateway picker path calledlist_picker_providers()directly, which builds onlist_authenticated_providers()and so never injected the virtualMixture of Agentsprovider row that the CLI/dashboard/desktop inventory adds. Result: gateway users couldn't select a MoA preset from the picker — even though #53548's docs now point them there for sticky preset selection.Salvage of #53526 by @dodo-reach, cherry-picked onto current
main, with a follow-up dedup commit.Changes
hermes_cli/model_switch.py: add an opt-ininclude_moaparam tolist_picker_providers(); when set, prepend the virtual MoA provider row. Existing callers keep the old behavior. (dodo-reach)gateway/slash_commands.py: enableinclude_moa=Trueon the gateway/modelpicker path. (dodo-reach)hermes_cli/inventory.py+hermes_cli/model_switch.py(follow-up dedup): the cherry-pick added a second copy of the MoA row builder. Refactoredinventory._moa_provider_rowto take a barecurrent_providerstring and reused it from the gateway picker path, so the row shape lives in one place and the two surfaces can't drift.Validation
scripts/run_tests.sh tests/hermes_cli/test_list_picker_providers.py tests/gateway/test_model_command_async_offload.py tests/hermes_cli/test_inventory.py→ 48/48 passed (includes the inventory tests exercising the shared row builder).Infographic