moved llist of apis to global variable and imported in test

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
Francisco Javier Arceo 2025-09-16 20:22:18 -04:00
parent e3d98059fc
commit 6db4c39401
2 changed files with 18 additions and 10 deletions

View file

@ -26,6 +26,9 @@ from llama_stack.providers.datatypes import (
logger = get_logger(name=__name__, category="core")
INTERNAL_APIS = {Api.inspect, Api.providers, Api.prompts}
def stack_apis() -> list[Api]:
return list(Api)
@ -70,8 +73,7 @@ def builtin_automatically_routed_apis() -> list[AutoRoutedApiInfo]:
def providable_apis() -> list[Api]:
routing_table_apis = {x.routing_table_api for x in builtin_automatically_routed_apis()}
internal_apis = {Api.inspect, Api.providers, Api.prompts}
return [api for api in Api if api not in routing_table_apis and api not in internal_apis]
return [api for api in Api if api not in routing_table_apis and api not in INTERNAL_APIS]
def _load_remote_provider_spec(spec_data: dict[str, Any], api: Api) -> ProviderSpec: