Skip to content

The agent that grows with you

fix(moa): show who pays on every MoA surface and trim the salvage to two invariants

teknium1587c7d96311c
diff --git a/apps/desktop/src/app/settings/model-settings.test.tsx b/apps/desktop/src/app/settings/model-settings.test.tsx
index 210b912f8ea..47e0f8be5e0 100644
--- a/apps/desktop/src/app/settings/model-settings.test.tsx
+++ b/apps/desktop/src/app/settings/model-settings.test.tsx
@@ -678,16 +678,11 @@ describe('ModelSettings MoA preset editor', () => {
}
})
- it('labels the aggregator as the acting, billed model and references as advising', async () => {
+ it('labels the aggregator row as the acting model billed for the run', async () => {
await openReferenceEditor()
- // The aggregator row must carry the acting/billed pill right next to its
- // title — this is the slot that pays for the whole tool loop.
+ // The aggregator row is the slot that pays for the whole tool loop (#112359).
expect(screen.getByText('acting model · billed for the run')).toBeTruthy()
- // Reference rows say what they actually do: advise once per user turn.
- expect(screen.getAllByText('advises once per turn')).toHaveLength(2)
- // The section blurb spells out the billing consequence.
- expect(screen.getByText(/billed to its provider/i)).toBeTruthy()
})
})
diff --git a/apps/desktop/src/app/settings/model-settings.tsx b/apps/desktop/src/app/settings/model-settings.tsx
index 976e11bbde6..bf302fa2f31 100644
--- a/apps/desktop/src/app/settings/model-settings.tsx
+++ b/apps/desktop/src/app/settings/model-settings.tsx
@@ -1157,11 +1157,7 @@ export function ModelSettings({ onMainModelChanged, scopeProfile }: ModelSetting
{moa && currentMoaPreset && (
<section>
<SectionHeading icon={Cpu} title={m.moaTitle} />
- <p className="mb-2 text-xs text-muted-foreground">
- Configure named presets that appear as models under the Mixture of Agents provider. The aggregator is the
- acting model — it runs every step of the tool loop, and almost all of the run's cost is billed to its
- provider. References only advise once per user turn.
- </p>
+ <p className="mb-2 text-xs text-muted-foreground">{m.moaDescription}</p>
<div className="mb-2 flex flex-wrap items-center gap-2">
<Select onValueChange={setSelectedMoaPreset} value={selectedMoaPreset || moa.default_preset}>
<SelectTrigger className={cn('min-w-40', CONTROL_TEXT)}>
diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts
index 1fd3e42edbc..407c3e87be3 100644
--- a/apps/desktop/src/i18n/en.ts
+++ b/apps/desktop/src/i18n/en.ts
@@ -1385,6 +1385,8 @@ export const en: Translations = {
notInCatalog: "isn't in this provider's model list — calls may fall back to a backup.",
moaTitle: 'Mixture of Agents',
moaPreset: 'Preset',
+ moaDescription:
+ 'Configure named presets that appear as models under the Mixture of Agents provider. The aggregator is the acting model — it runs every step of the tool loop, and almost all of the run’s cost is billed to its provider. References only advise once per user turn.',
moaAggregator: 'Aggregator',
moaAggregatorBilled: 'acting model · billed for the run',
moaReferenceHint: 'advises once per turn',
diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.ts
index 9783760017f..37dd3e3be18 100644
--- a/apps/desktop/src/i18n/types.ts
+++ b/apps/desktop/src/i18n/types.ts
@@ -1232,6 +1232,7 @@ export interface Translations {
notInCatalog: string
moaTitle: string
moaPreset: string
+ moaDescription: string
moaAggregator: string
moaAggregatorBilled: string
moaReferenceHint: string
diff --git a/apps/desktop/src/i18n/zh-hant.ts b/apps/desktop/src/i18n/zh-hant.ts
index 71e39a85b54..a23a185305b 100644
--- a/apps/desktop/src/i18n/zh-hant.ts
+++ b/apps/desktop/src/i18n/zh-hant.ts
@@ -1219,6 +1219,8 @@ export const zhHant = defineLocale({
providerDefault: '(提供方預設)',
moaTitle: '混合代理(Mixture of Agents)',
moaPreset: '預設',
+ moaDescription:
+ '設定以「混合代理」提供者下模型形式出現的命名預設。聚合模型是執行模型——它執行工具迴圈的每一步,整個運行幾乎全部費用都計入其提供者。參考模型每輪使用者訊息僅提供一次建議。',
moaAggregator: '聚合模型',
moaAggregatorBilled: '執行模型 · 整個運行在此計費',
moaReferenceHint: '每輪僅建議一次',
diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.ts
index 7b9c09b5121..9af56b0a708 100644
--- a/apps/desktop/src/i18n/zh.ts
+++ b/apps/desktop/src/i18n/zh.ts
@@ -1580,6 +1580,8 @@ export const zh = defineLocale({
notInCatalog: '不在该提供方的模型列表中 — 调用可能回退到备用模型。',
moaTitle: '混合智能体(Mixture of Agents)',
moaPreset: '预设',
+ moaDescription:
+ '配置以「混合智能体」提供商下模型形式出现的命名预设。聚合模型是执行模型——它运行工具循环的每一步,整个运行几乎全部费用都计入其提供商。参考模型每轮用户消息仅提供一次建议。',
moaAggregator: '聚合模型',
moaAggregatorBilled: '执行模型 · 整个运行在此计费',
moaReferenceHint: '每轮仅建议一次',
diff --git a/hermes_cli/cli_model_switch_mixin.py b/hermes_cli/cli_model_switch_mixin.py
index d84cdc073bb..7e4e6422679 100644
--- a/hermes_cli/cli_model_switch_mixin.py
+++ b/hermes_cli/cli_model_switch_mixin.py
@@ -116,6 +116,13 @@ def _print_switch_summary(cli, result, old_model, *, one_turn: bool, strict_cont
f"Adjust your self-identification accordingly.]")
_cprint(f" ✓ Model switched: {_display_new}")
_cprint(f" Provider: {result.provider_label or result.target_provider}")
+ if result.target_provider == "moa":
+ # The preset name hides who pays: the aggregator runs every tool-loop step (#112359).
+ from hermes_cli.moa_config import normalize_moa_config
+ moa_cfg = cli.config.get("moa") if isinstance(cli.config, dict) else {}
+ agg = normalize_moa_config(moa_cfg)["presets"].get(result.new_model, {}).get("aggregator") or {}
+ if agg:
+ _cprint(f" Acting model (billed for the run): {agg.get('provider')}:{agg.get('model')}")
# Provider-aware context chain: Codex OAuth / Copilot / Nous caps win over the raw
# models.dev entry (gpt-5.5 is 1.05M on openai but 272K on Codex OAuth).
diff --git a/hermes_cli/inventory.py b/hermes_cli/inventory.py
index 6fea7326f0c..bd649aca74d 100644
--- a/hermes_cli/inventory.py
+++ b/hermes_cli/inventory.py
@@ -744,6 +744,6 @@ def _moa_provider_row(current_provider: str = "") -> dict | None:
return _row(
"moa", "Mixture of Agents", (current_provider or "").lower() == "moa", models=models,
total_models=len(models), source="virtual", authenticated=True, auth_type="virtual",
- warning="Aggregator acts as the selected model; references provide analysis before each call.")
+ warning="Aggregator is the acting model billed for the run; references only advise once per user turn.")
except Exception:
return None
diff --git a/tests/hermes_cli/test_moa_config.py b/tests/hermes_cli/test_moa_config.py
index 293337da330..afc905e3fbe 100644
--- a/tests/hermes_cli/test_moa_config.py
+++ b/tests/hermes_cli/test_moa_config.py
@@ -156,7 +156,9 @@ def test_validate_moa_payload_agrees_with_clean_slot():
assert cfg["presets"]["p"]["aggregator"] == payload["presets"]["p"]["aggregator"]
-def test_aggregator_billing_hint_in_print_config(capsys):
+def test_print_config_marks_aggregator_as_billed_and_warns_on_provider_mismatch(capsys):
+ """#112359: the aggregator is the acting model billed for the run; when it sits on a
+ different provider than the main model, ``hermes moa list``/``configure`` say so."""
from hermes_cli import moa_cmd
moa_cmd._print_config({"model": {"provider": "openai-codex"}})
@@ -164,19 +166,14 @@ def test_aggregator_billing_hint_in_print_config(capsys):
out = capsys.readouterr().out
assert "acting model — runs every step" in out
assert "advise once per user turn" in out
- # The main provider differs from the preset's aggregator (openrouter by
- # default) → the billing notice must fire and name both providers.
- assert (
- "Aggregator is on openrouter; the whole tool loop will be billed there, not to openai-codex."
- in out
- )
+ # Default preset's aggregator is on openrouter → the notice names both providers.
+ assert "Aggregator is on openrouter; the whole tool loop will be billed there, not to openai-codex." in out
-def test_no_billing_notice_when_aggregator_matches_main_provider(capsys):
[email protected]("cfg", [{"model": {"provider": "openrouter"}}, {}])
+def test_billing_notice_silent_when_providers_match_or_main_unknown(cfg, capsys):
from hermes_cli import moa_cmd
- cfg = {"model": {"provider": "openrouter"}}
-
moa_cmd._print_config(cfg)
out = capsys.readouterr().out
@@ -184,14 +181,6 @@ def test_no_billing_notice_when_aggregator_matches_main_provider(capsys):
assert "Aggregator is on" not in out
-def test_billing_notice_silent_without_main_provider(capsys):
- from hermes_cli import moa_cmd
-
- moa_cmd._print_config({})
-
- assert "Aggregator is on" not in capsys.readouterr().out
-
-
# ── Per-slot max_tokens ────────────────────────────────────────────────────
diff --git a/website/docs/user-guide/features/mixture-of-agents.md b/website/docs/user-guide/features/mixture-of-agents.md
index 6b78f6d96dd..2dd9955c5fa 100644
--- a/website/docs/user-guide/features/mixture-of-agents.md
+++ b/website/docs/user-guide/features/mixture-of-agents.md
@@ -10,6 +10,10 @@ Mixture of Agents is a virtual model provider. Each named MoA preset appears as
When you select a MoA preset, the preset's aggregator is the acting model. It is the model that writes the assistant response and emits tool calls. Reference models run first and provide analysis for the aggregator to use.
+:::info Who pays for a MoA run
+The **aggregator is billed for the whole run**: it runs every step of the tool loop, so almost all of a preset's cost lands on the aggregator's provider. References only advise once per user turn (with the default `fanout`). If your main model is on a subscription provider but the aggregator sits elsewhere, the run is billed to the aggregator's provider, not to your subscription — `hermes moa configure` and `hermes moa list` print a one-line notice whenever the aggregator's provider differs from `model.provider`, and the Desktop editor, `hermes model`, and `/model` mark the aggregator slot as the acting, billed model.
+:::
+
Use MoA when a hard task benefits from multiple model perspectives but still needs Hermes' normal agent loop: tool calls, follow-up iterations, interrupts, transcript persistence, and the same session context as any other message.
## Select a MoA preset as your model
@@ -214,6 +218,12 @@ hermes moa configure review # create or update a named preset
hermes moa delete review
```
+`hermes moa list` marks the aggregator as the acting model that carries almost all of the cost and lists references as advising once per user turn. When the aggregator's provider differs from your main `model.provider`, both `list` and `configure` add:
+
+```text
+Aggregator is on nous; the whole tool loop will be billed there, not to openai-codex.
+```
+
## Benchmarks
On HermesBench, a two-model MoA preset — `claude-opus-4.8` aggregating over a `gpt-5.5` reference — outscores either model run on its own: