From 2d1ab3ca5592e946515d77c93fe3c3ac0108667f Mon Sep 17 00:00:00 2001 From: Matthew Farrellee Date: Tue, 29 Jul 2025 15:54:21 -0400 Subject: [PATCH] fix: use same image_name logic for build & run config (#2949) # What does this PR do? when --image-name is not provided the build script default to the image_name in the config, this makes sure the same is done for the run script ## Test Plan llama stack build w/o --image-name --- llama_stack/cli/stack/_build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama_stack/cli/stack/_build.py b/llama_stack/cli/stack/_build.py index fbf4871c4..3718e456c 100644 --- a/llama_stack/cli/stack/_build.py +++ b/llama_stack/cli/stack/_build.py @@ -279,7 +279,7 @@ def run_stack_build_command(args: argparse.Namespace) -> None: config = parse_and_maybe_upgrade_config(config_dict) if config.external_providers_dir and not config.external_providers_dir.exists(): config.external_providers_dir.mkdir(exist_ok=True) - run_args = formulate_run_args(args.image_type, args.image_name) + run_args = formulate_run_args(args.image_type, image_name or config.image_name) run_args.extend([str(os.getenv("LLAMA_STACK_PORT", 8321)), "--config", str(run_config)]) run_command(run_args)