fix(doctor): recognise 'moa' as a valid internal provider

MoA (Mixture of Agents) is a legitimate internal provider used by
Diagnosis presets and multi-model aggregation. When a MoA preset sets
model.provider to 'moa', hermes doctor incorrectly reports it as
'unrecognised' and suggests changing it, which would break the MoA setup.

Add 'moa' to the known_providers set alongside 'openrouter', 'custom',
and 'auto' so doctor recognises it as valid.

Fixes #58759
This commit is contained in:
liuhao1024 2026-07-05 17:49:04 +08:00 committed by Teknium
parent d661886c90
commit c1f5f0f911
2 changed files with 2 additions and 1 deletions

View file

@ -872,7 +872,7 @@ def run_doctor(args):
PROVIDER_REGISTRY,
resolve_provider as _resolve_auth_provider,
)
known_providers = set(PROVIDER_REGISTRY.keys()) | {"openrouter", "custom", "auto"}
known_providers = set(PROVIDER_REGISTRY.keys()) | {"openrouter", "custom", "auto", "moa"}
except Exception:
_resolve_auth_provider = None
pass

View file

@ -517,6 +517,7 @@ def test_run_doctor_flags_missing_credentials_for_active_openrouter_provider(mon
("kilocode", "anthropic/claude-sonnet-4.6"),
("kimi-coding", "kimi-k2"),
("nvidia", "qwen/qwen3.5-122b-a10b"),
("moa", "anthropic/claude-sonnet-4.6"),
],
)
def test_run_doctor_accepts_hermes_provider_ids_that_catalog_aliases(