fix(providers): log warning when custom provider entry yields empty slug
Opus stage-338 review SHOULD-FIX: silent drop at api/providers.py:1049 was diagnostically opaque. logger.warning() now surfaces the bad config entry so operators can spot misconfigurations. Co-authored-by: Opus advisor <opus-advisor@hermes.local>
This commit is contained in:
1 parent
87bd9ea372
commit
83de9d0cf0
1 file changed
+4
@@ -1047,6 +1047,10 @@ def get_providers() -> dict[str, Any]:
|
||||
cp_name = str(cp["name"]).strip()
|
||||
cp_id = _custom_provider_slug_from_name(cp_name)
|
||||
if not cp_id:
|
||||
logger.warning(
|
||||
"Custom provider entry %r produced empty slug; skipping",
|
||||
cp_name,
|
||||
)
|
||||
continue
|
||||
# Collect models from `models` list or `model` single
|
||||
cp_models = []
|
||||
|
||||
Reference in new issue
Block a user