From dd1f946b3ee4232dc8e13d3836e7f19e65f5e112 Mon Sep 17 00:00:00 2001 From: Matthew Farrellee Date: Tue, 9 Sep 2025 18:54:58 -0400 Subject: [PATCH] feat: include a default inference store during llama stack build (#3373) # What does this PR do? enables completions storage when using `llama stack build --providers` - - GET /v1/chat/completions - GET /v1/chat/completions/{id} todo: llama stack build and distro codegen should use the same code paths ## Test Plan ci --- llama_stack/cli/stack/_build.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llama_stack/cli/stack/_build.py b/llama_stack/cli/stack/_build.py index c6e204773..b14e6fe55 100644 --- a/llama_stack/cli/stack/_build.py +++ b/llama_stack/cli/stack/_build.py @@ -45,6 +45,7 @@ from llama_stack.core.utils.dynamic import instantiate_class_type from llama_stack.core.utils.exec import formulate_run_args, run_command from llama_stack.core.utils.image_types import LlamaStackImageType from llama_stack.providers.datatypes import Api +from llama_stack.providers.utils.sqlstore.sqlstore import SqliteSqlStoreConfig DISTRIBS_PATH = Path(__file__).parent.parent.parent / "distributions" @@ -294,6 +295,12 @@ def _generate_run_config( if build_config.external_providers_dir else EXTERNAL_PROVIDERS_DIR, ) + if not run_config.inference_store: + run_config.inference_store = SqliteSqlStoreConfig( + **SqliteSqlStoreConfig.sample_run_config( + __distro_dir__=(DISTRIBS_BASE_DIR / image_name).as_posix(), db_name="inference_store.db" + ) + ) # build providers dict provider_registry = get_provider_registry(build_config) for api in apis: