fix(moa): name the billed aggregator in the gateway /model block and qualify the advise-once copy

Review follow-up for #112359:
- gateway `_format_session_info` (the /model info block) printed only
  `Model: <preset> / Provider: moa`, so the messaging surfaces still hid
  who pays; append the same "Acting model (billed for the run)" line the
  CLI switch summary prints.
- `_provider_mismatch_notice` compared providers case-sensitively and
  treated the routing pseudo-provider `auto` as a billing seat, printing a
  misleading "not to OpenAI" / "not to auto" line; lower-case both sides
  and skip `auto`.
- "references only advise once per user turn" is only true for the
  default `fanout: user_turn`; say "by default" on the inventory row, the
  `hermes moa list` header, the Desktop pill/description (en/zh/zh-hant)
  and the docs line.
This commit is contained in:
teknium1
2026-09-16 12:15:23 -07:00
committed by Teknium
parent 587c7d9631
commit c8f0f6b136
8 changed files with 31 additions and 12 deletions

View File

@@ -76,12 +76,12 @@ def _provider_mismatch_notice(
if isinstance(cfg, dict):
model_section = cfg.get("model")
if isinstance(model_section, dict):
main_provider = str(model_section.get("provider") or "").strip()
agg_provider = str((aggregator or {}).get("provider") or "").strip()
main_provider = str(model_section.get("provider") or "").strip().lower()
agg_provider = str((aggregator or {}).get("provider") or "").strip().lower()
if (
not main_provider
or not agg_provider
or main_provider == "moa"
or main_provider in ("moa", "auto") # "auto" is a routing pseudo-provider, not a billing seat
or main_provider == agg_provider
):
return None
@@ -98,7 +98,7 @@ def _print_config(config: dict[str, Any]) -> None:
print(f"Active in config: {cfg.get('active_preset') or '(off)'}")
for name, preset in cfg["presets"].items():
print(f"\n{'*' if name == cfg['default_preset'] else ' '} {name}")
print(" Reference models (advise once per user turn):")
print(" Reference models (advise once per user turn by default):")
for idx, slot in enumerate(preset["reference_models"], start=1):
print(f" {idx}. {_format_slot(slot)}")
agg_slot = preset["aggregator"]