From 3dc5b5d3a016fa8113e02336eb208515ba9fa21b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Tue, 25 Nov 2025 10:57:27 +0100 Subject: [PATCH] fix: more accurate type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/llamastack/llama-stack/pull/4191#discussion_r2557389025 Signed-off-by: Sébastien Han --- src/llama_stack/core/server/fastapi_router_registry.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/llama_stack/core/server/fastapi_router_registry.py b/src/llama_stack/core/server/fastapi_router_registry.py index dea325036..178622853 100644 --- a/src/llama_stack/core/server/fastapi_router_registry.py +++ b/src/llama_stack/core/server/fastapi_router_registry.py @@ -10,6 +10,7 @@ This module provides utilities to create FastAPI routers from API packages. APIs with routers are explicitly listed here. """ +from collections.abc import Callable from typing import Any, cast from fastapi import APIRouter @@ -19,7 +20,7 @@ from fastapi import APIRouter from llama_stack_api.batches.fastapi_routes import create_router as create_batches_router from llama_stack_api.datatypes import Api -_ROUTER_FACTORIES: dict[str, Any] = { +_ROUTER_FACTORIES: dict[str, Callable[[Any], APIRouter]] = { "batches": create_batches_router, }