Skip to content

fix(gateway): show MoA presets in the gateway model picker - #53561

Merged
teknium1 merged 2 commits into
mainfrom
fix/moa-gateway-picker
Jun 27, 2026
Merged

fix(gateway): show MoA presets in the gateway model picker#53561
teknium1 merged 2 commits into
mainfrom
fix/moa-gateway-picker

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

MoA presets now appear in the gateway /model picker (Telegram/Discord inline keyboards). The gateway picker path called list_picker_providers() directly, which builds on list_authenticated_providers() and so never injected the virtual Mixture of Agents provider 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-in include_moa param to list_picker_providers(); when set, prepend the virtual MoA provider row. Existing callers keep the old behavior. (dodo-reach)
  • gateway/slash_commands.py: enable include_moa=True on the gateway /model picker 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. Refactored inventory._moa_provider_row to take a bare current_provider string 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

moa-gateway-picker

dodo-reach and others added 2 commits June 27, 2026 03:27
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.
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: fix/moa-gateway-picker vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 11481 on HEAD, 11483 on base (✅ -2)

🆕 New issues (1):

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.

@teknium1
teknium1 merged commit a5d1f68 into main Jun 27, 2026
30 checks passed
@teknium1
teknium1 deleted the fix/moa-gateway-picker branch June 27, 2026 10:43
@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have labels Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants