feat: add --providers to llama stack build

allow users to specify only the providers they want in the llama stack build command.
If a user wants a non-interactive build, but doesn't want to use a template, `--providers` allows
someone to specify something like `--providers inference=remote::ollama` for a distro with JUST ollama

Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
Charlie Doern 2025-03-19 21:36:23 -04:00
parent af8b4484a3
commit 58a62e2093
2 changed files with 43 additions and 0 deletions

View file

@ -74,6 +74,12 @@ the build. If not specified, currently active Conda environment will be used if
default=False,
help="Run the stack after building using the same image type, name, and other applicable arguments",
)
self.parser.add_argument(
"--providers",
type=str,
default=None,
help="Build a config for a list of providers and only those providers. This list is formatted like: api1=provider1,api2=provider2. Where there can be multiple providers per API.",
)
def _run_stack_build_command(self, args: argparse.Namespace) -> None:
# always keep implementation completely silo-ed away from CLI so CLI