From d8e8bb140b2dff1552aeb1e6bcecf8da98cd48b9 Mon Sep 17 00:00:00 2001 From: Nathan Weinberg Date: Tue, 2 Dec 2025 14:41:24 -0500 Subject: [PATCH] chore: add logging for empty model lists previously there was no logging for empty model lists add debug lines for individual registry and dynamic model lists, and error if no models are found from either Signed-off-by: Nathan Weinberg --- src/llama_stack/core/routing_tables/models.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/llama_stack/core/routing_tables/models.py b/src/llama_stack/core/routing_tables/models.py index 1facbb27b..305c22c3f 100644 --- a/src/llama_stack/core/routing_tables/models.py +++ b/src/llama_stack/core/routing_tables/models.py @@ -135,6 +135,14 @@ class ModelsRoutingTable(CommonRoutingTableImpl, Models): all_models = registry_models + unique_dynamic_models + # Log error if no models are found, log debug statement if either registry or dynamic is empty + if len(all_models) == 0: + logger.error("No models found from registry or providers data") + elif len(registry_models) == 0: + logger.debug("No models found in registry") + elif len(dynamic_models) == 0: + logger.debug("No models found via providers data") + openai_models = [ OpenAIModel( id=model.identifier,