hermes-agent/tests/run_agent
Teknium c6575df927
feat(moa): expose MoA presets as selectable virtual models (#46081)
* feat(moa): expose MoA presets as selectable virtual models

Reconstructed onto current main (PR #46081's base had diverged with no common
ancestor, marking the PR dirty so CI never dispatched). MoA is now a virtual
provider: each named preset is a selectable model under provider 'moa', and the
preset's aggregator is the acting model that answers and calls tools.

Reference models fan out in parallel via a bounded ThreadPoolExecutor (the same
batch pattern delegate_task uses) — all references dispatched at once, collected
when every one finishes, then handed to the aggregator. Output order is
preserved, failures and the MoA-recursion guard stay isolated per reference.

- Removed the old mixture_of_agents model tool and moa toolset.
- Added moa as a virtual provider in the provider/model inventory.
- /moa is shortcut behavior over model selection (default preset / named preset
  / one-shot prompt).
- Dashboard + Desktop manage named presets; presets appear in model pickers.
- Parallel reference fan-out in agent/moa_loop.py with regression test.

* fix(moa): thread moa_config through _run_agent to _run_agent_inner

The reconstructed gateway MoA wiring declared moa_config on _run_agent (the
profile-scoping wrapper) and used it inside _run_agent_inner, but the wrapper
never forwarded it — _run_agent_inner had no such parameter, so the runtime hit
NameError: name 'moa_config' is not defined on the compression-failure session
sync path. Add moa_config to _run_agent_inner's signature and forward it from
both wrapper call sites (multiplex and non-multiplex). Caught by
tests/gateway/test_compression_failure_session_sync.py on CI shard test(4).

* fix(moa): classify moa as a virtual provider in the catalog

The moa virtual provider has no PROVIDER_REGISTRY/ProviderProfile entry, so
provider_catalog() fell through to the default auth_type="api_key" with no
env vars — tripping two catalog invariants:
  - test_provider_catalog: api_key providers must expose a credential env var
  - test_provider_parity: every hermes-model provider must be desktop-configurable

moa already declares auth_type="virtual" in HERMES_OVERLAYS; consult that
overlay as an auth_type fallback so the catalog reports moa as virtual (no real
credential, no network endpoint). Exempt virtual providers from the desktop
parity union check the same way 'custom' is exempt — derived from the catalog,
not a hardcoded slug, so future virtual providers are covered too.
2026-06-25 13:52:06 -07:00
..
__init__.py
conftest.py
repro_48013_image_shrink_brick.py
test_413_compression.py
test_860_dedup.py
test_1630_context_overflow_loop.py
test_18028_content_policy_blocked.py
test_31273_402_not_retried.py
test_agent_guardrails.py
test_anthropic_prompt_cache_policy.py
test_anthropic_third_party_oauth_guard.py
test_anthropic_truncation_continuation.py
test_api_max_retries_config.py
test_async_httpx_del_neuter.py
test_auth_provider_failover.py
test_background_review.py
test_background_review_cache_parity.py
test_background_review_cost_controls.py
test_background_review_summary.py
test_background_review_toolset_restriction.py
test_callable_api_key.py
test_codex_app_server_integration.py
test_codex_multimodal_tool_result.py
test_codex_no_tools_nonetype.py
test_codex_silent_hang_hint.py
test_codex_xai_oauth_recovery.py
test_commit_memory_session_context_engine.py
test_compress_focus_plugin_fallback.py
test_compression_boundary.py
test_compression_boundary_hook.py test(compression): pin rotation-fallback tests to in_place=False ahead of default flip 2026-06-25 12:56:05 -07:00
test_compression_feasibility.py fix(auxiliary): honor fallback chain when compression provider auth is unavailable 2026-06-25 13:08:18 -07:00
test_compression_persistence.py
test_compression_trigger_excludes_reasoning.py
test_compressor_fallback_update.py
test_concurrent_interrupt.py
test_context_token_tracking.py
test_copilot_native_vision_headers.py
test_create_openai_client_kwargs_isolation.py
test_create_openai_client_proxy_env.py
test_create_openai_client_reuse.py
test_credential_pool_interrupt.py
test_credits_notices_toggle.py
test_deepseek_reasoning_content_echo.py
test_deepseek_v4_thinking_live.py
test_dict_tool_call_args.py
test_empty_response_recovery_persistence.py
test_exit_cleanup_interrupt.py
test_fallback_credential_isolation.py
test_file_mutation_verifier.py feat(agent): require verification before finishing edits 2026-06-24 23:02:48 -05:00
test_identity_flush.py
test_image_rejection_fallback.py
test_image_shrink_recovery.py
test_in_place_compaction.py test(compression): pin rotation-fallback tests to in_place=False ahead of default flip 2026-06-25 12:56:05 -07:00
test_infinite_compaction_loop.py
test_init_fallback_on_exhausted_pool.py
test_interactive_interrupt.py
test_interrupt_propagation.py
test_invalid_context_length_warning.py
test_iteration_budget_race.py
test_jsondecodeerror_retryable.py
test_last_reasoning_per_turn.py
test_long_context_tier_429.py
test_materialize_data_url_cleanup.py
test_memory_nudge_counter_hydration.py
test_memory_provider_init.py
test_memory_sync_interrupted.py
test_message_sequence_repair.py
test_moa_loop_mode.py feat(moa): expose MoA presets as selectable virtual models (#46081) 2026-06-25 13:52:06 -07:00
test_multimodal_tool_content_recovery.py
test_nonretryable_error_html_summary.py
test_notice_spine.py
test_nous_429_fallback_reentry.py
test_openai_client_lifecycle.py
test_partial_stream_finish_reason.py
test_percentage_clamp.py
test_plugin_context_engine_init.py
test_primary_runtime_restore.py
test_provider_attribution_headers.py
test_provider_fallback.py
test_provider_parity.py
test_real_interrupt_subagent.py
test_redirect_stdout_issue.py
test_repair_tool_call_arguments.py
test_repair_tool_call_name.py
test_retry_status_buffer.py
test_review_prompt_class_first.py
test_run_agent.py fix(agent): handle concurrent tool submit shutdown 2026-06-24 02:56:56 +05:30
test_run_agent_codex_responses.py
test_run_agent_multimodal_prologue.py
test_sequential_chats_live.py
test_session_id_env.py
test_session_meta_filtering.py
test_session_reset_fix.py
test_session_source.py
test_steer.py
test_stream_drop_logging.py
test_stream_interrupt_retry.py
test_streaming.py
test_streaming_tool_call_repair.py
test_strict_api_validation.py
test_strip_reasoning_tags_cli.py
test_switch_model_context.py
test_switch_model_fallback_prune.py
test_switch_model_rollback.py
test_thinking_only_sanitizer.py
test_thinking_sig_recovery_persistence.py
test_tls_fd_recycle_corruption.py
test_token_persistence_non_cli.py
test_tool_arg_coercion.py
test_tool_call_args_sanitizer.py
test_tool_call_guardrail_runtime.py
test_tool_call_incremental_persistence.py
test_tool_executor_contextvar_propagation.py
test_tool_name_db_persistence.py
test_turn_completion_explainer.py
test_unicode_ascii_codec.py
test_vision_aware_preprocessing.py
test_vision_tool_messages.py