From 23e74446db217ddbf9559ab9b0f83cf10055297a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 21 Nov 2025 11:41:53 +0100 Subject: [PATCH] chore: rename routes.py to fastapi_routes.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- src/llama_stack/core/server/router_registry.py | 4 ++-- src/llama_stack_api/batches/__init__.py | 2 +- src/llama_stack_api/batches/{routes.py => fastapi_routes.py} | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename src/llama_stack_api/batches/{routes.py => fastapi_routes.py} (100%) diff --git a/src/llama_stack/core/server/router_registry.py b/src/llama_stack/core/server/router_registry.py index 4849241e2..5851c0b5b 100644 --- a/src/llama_stack/core/server/router_registry.py +++ b/src/llama_stack/core/server/router_registry.py @@ -30,7 +30,7 @@ def has_router(api: "Api") -> bool: True if the API has a routes module with a create_router function """ try: - routes_module = importlib.import_module(f"llama_stack_api.{api.value}.routes") + routes_module = importlib.import_module(f"llama_stack_api.{api.value}.fastapi_routes") return hasattr(routes_module, "create_router") except (ImportError, AttributeError): return False @@ -50,7 +50,7 @@ def build_router(api: "Api", impl_getter: Callable[["Api"], Any]) -> APIRouter | APIRouter if the API has a routes module with create_router, None otherwise """ try: - routes_module = importlib.import_module(f"llama_stack_api.{api.value}.routes") + routes_module = importlib.import_module(f"llama_stack_api.{api.value}.fastapi_routes") if hasattr(routes_module, "create_router"): router_factory = routes_module.create_router return router_factory(impl_getter) diff --git a/src/llama_stack_api/batches/__init__.py b/src/llama_stack_api/batches/__init__.py index ebde45844..33dc62b81 100644 --- a/src/llama_stack_api/batches/__init__.py +++ b/src/llama_stack_api/batches/__init__.py @@ -8,7 +8,7 @@ This module contains the Batches protocol definition. Pydantic models are defined in llama_stack_api.batches.models. -The FastAPI router is defined in llama_stack_api.batches.routes. +The FastAPI router is defined in llama_stack_api.batches.fastapi_routes. """ from typing import Protocol, runtime_checkable diff --git a/src/llama_stack_api/batches/routes.py b/src/llama_stack_api/batches/fastapi_routes.py similarity index 100% rename from src/llama_stack_api/batches/routes.py rename to src/llama_stack_api/batches/fastapi_routes.py