From aa424e51acbfd057a3ae81dce8d26e2d6ce7108c Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Mon, 8 Jun 2026 15:21:29 -0700 Subject: [PATCH] refactor(doctor): fold custom-provider vendor-slug check into one predicate Collapse the bare-"custom" allowlist entry and the custom: guard into a single provider_accepts_vendor_slug predicate so the slug-warning suppression reads as one rule instead of two scattered conditions. No behavior change. --- hermes_cli/doctor.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hermes_cli/doctor.py b/hermes_cli/doctor.py index d56ff88c9d2..58f464985bd 100644 --- a/hermes_cli/doctor.py +++ b/hermes_cli/doctor.py @@ -738,12 +738,14 @@ def run_doctor(args): issues, ) - # Warn if model is set to a provider-prefixed name on a provider that doesn't use them + # Warn if model is set to a provider-prefixed name on a provider that doesn't use them. + # Vendor/model slugs are valid on aggregator-style providers and on any custom + # provider — bare "custom" or a named "custom:" that fronts an OpenAI-compatible + # aggregator (e.g. custom:hpc-ai serving deepseek/deepseek-v4-flash) requires the prefix. provider_for_policy = runtime_provider or catalog_provider provider_policy_id = str(provider_for_policy or "").strip().lower() providers_accepting_vendor_slugs = { "openrouter", - "custom", "auto", "kilocode", "opencode-zen", @@ -751,12 +753,16 @@ def run_doctor(args): "lmstudio", "nous", } + provider_accepts_vendor_slug = ( + provider_policy_id in providers_accepting_vendor_slugs + or provider_policy_id == "custom" + or provider_policy_id.startswith("custom:") + ) if ( default_model and "/" in default_model and provider_policy_id - and provider_policy_id not in providers_accepting_vendor_slugs - and not provider_policy_id.startswith("custom:") + and not provider_accepts_vendor_slug ): check_warn( f"model.default '{default_model}' uses a vendor/model slug but provider is '{provider_raw}'",