From c899b50723baa5689faad2802dd7b00662d9f649 Mon Sep 17 00:00:00 2001 From: Charlie Doern Date: Wed, 5 Nov 2025 14:34:08 -0500 Subject: [PATCH 1/3] fix: print help for list-deps if no args (#4078) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # What does this PR do? list-deps takes positional args OR things like --providers the issue with this, is that these args need to be optional since by nature, one or the other can be specified. add a check to list-deps that checks `if not args.providers and not args.config`. If this is true, help is printed and we exit. resolves #4075 ## Test Plan before: ``` ╰─ llama stack list-deps Traceback (most recent call last): File "/Users/charliedoern/projects/Documents/llama-stack/venv/bin/llama", line 10, in sys.exit(main()) ^^^^^^ File "/Users/charliedoern/projects/Documents/llama-stack/src/llama_stack/cli/llama.py", line 52, in main parser.run(args) File "/Users/charliedoern/projects/Documents/llama-stack/src/llama_stack/cli/llama.py", line 43, in run args.func(args) File "/Users/charliedoern/projects/Documents/llama-stack/src/llama_stack/cli/stack/list_deps.py", line 51, in _run_stack_list_deps_command return run_stack_list_deps_command(args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/charliedoern/projects/Documents/llama-stack/src/llama_stack/cli/stack/_list_deps.py", line 135, in run_stack_list_deps_command normal_deps, special_deps, external_provider_dependencies = get_provider_dependencies(build_config) ^^^^^^^^^^^^ UnboundLocalError: cannot access local variable 'build_config' where it is not associated with a value ``` after: ``` ╰─ llama stack list-deps usage: llama stack list-deps [-h] [--providers PROVIDERS] [--format {uv,deps-only}] [config | distro] list the dependencies for a llama stack distribution positional arguments: config | distro Path to config file to use or name of known distro (llama stack list for a list). (default: None) options: -h, --help show this help message and exit --providers PROVIDERS sync dependencies 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. (default: None) --format {uv,deps-only} Output format: 'uv' shows shell commands, 'deps-only' shows just the list of dependencies without `uv` (default) (default: deps-only) ``` Signed-off-by: Charlie Doern --- src/llama_stack/cli/stack/list_deps.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/llama_stack/cli/stack/list_deps.py b/src/llama_stack/cli/stack/list_deps.py index b6eee1f3b..d6c52c8ef 100644 --- a/src/llama_stack/cli/stack/list_deps.py +++ b/src/llama_stack/cli/stack/list_deps.py @@ -46,6 +46,10 @@ class StackListDeps(Subcommand): def _run_stack_list_deps_command(self, args: argparse.Namespace) -> None: # always keep implementation completely silo-ed away from CLI so CLI # can be fast to load and reduces dependencies + if not args.config and not args.providers: + self.parser.print_help() + self.parser.exit() + from ._list_deps import run_stack_list_deps_command return run_stack_list_deps_command(args) From d9cf5cd48025c2579b5149c595df5bd351c2d465 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Wed, 5 Nov 2025 12:14:02 -0800 Subject: [PATCH 2/3] fix(ci): use --no-cache instead of --no-cache-dir (#4081) This is necessary to make sure GPU dockers can be built on CI without running out of space. --- containers/Containerfile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/containers/Containerfile b/containers/Containerfile index d2d066845..4993d3273 100644 --- a/containers/Containerfile +++ b/containers/Containerfile @@ -47,7 +47,7 @@ RUN set -eux; \ exit 1; \ fi -RUN pip install --no-cache-dir uv +RUN pip install --no-cache uv ENV UV_SYSTEM_PYTHON=1 ENV INSTALL_MODE=${INSTALL_MODE} @@ -72,7 +72,7 @@ RUN set -eux; \ echo "LLAMA_STACK_CLIENT_DIR is set but $LLAMA_STACK_CLIENT_DIR does not exist" >&2; \ exit 1; \ fi; \ - uv pip install --no-cache-dir -e "$LLAMA_STACK_CLIENT_DIR"; \ + uv pip install --no-cache -e "$LLAMA_STACK_CLIENT_DIR"; \ fi; # Install llama-stack @@ -88,22 +88,22 @@ RUN set -eux; \ fi; \ if [ -n "$SAVED_UV_EXTRA_INDEX_URL" ] && [ -n "$SAVED_UV_INDEX_STRATEGY" ]; then \ UV_EXTRA_INDEX_URL="$SAVED_UV_EXTRA_INDEX_URL" UV_INDEX_STRATEGY="$SAVED_UV_INDEX_STRATEGY" \ - uv pip install --no-cache-dir -e "$LLAMA_STACK_DIR"; \ + uv pip install --no-cache -e "$LLAMA_STACK_DIR"; \ else \ - uv pip install --no-cache-dir -e "$LLAMA_STACK_DIR"; \ + uv pip install --no-cache -e "$LLAMA_STACK_DIR"; \ fi; \ elif [ "$INSTALL_MODE" = "test-pypi" ]; then \ - uv pip install --no-cache-dir fastapi libcst; \ + uv pip install --no-cache fastapi libcst; \ if [ -n "$TEST_PYPI_VERSION" ]; then \ - uv pip install --no-cache-dir --extra-index-url https://test.pypi.org/simple/ --index-strategy unsafe-best-match "llama-stack==$TEST_PYPI_VERSION"; \ + uv pip install --no-cache --extra-index-url https://test.pypi.org/simple/ --index-strategy unsafe-best-match "llama-stack==$TEST_PYPI_VERSION"; \ else \ - uv pip install --no-cache-dir --extra-index-url https://test.pypi.org/simple/ --index-strategy unsafe-best-match llama-stack; \ + uv pip install --no-cache --extra-index-url https://test.pypi.org/simple/ --index-strategy unsafe-best-match llama-stack; \ fi; \ else \ if [ -n "$PYPI_VERSION" ]; then \ - uv pip install --no-cache-dir "llama-stack==$PYPI_VERSION"; \ + uv pip install --no-cache "llama-stack==$PYPI_VERSION"; \ else \ - uv pip install --no-cache-dir llama-stack; \ + uv pip install --no-cache llama-stack; \ fi; \ fi; @@ -117,7 +117,7 @@ RUN set -eux; \ fi; \ deps="$(llama stack list-deps "$DISTRO_NAME")"; \ if [ -n "$deps" ]; then \ - printf '%s\n' "$deps" | xargs -L1 uv pip install --no-cache-dir; \ + printf '%s\n' "$deps" | xargs -L1 uv pip install --no-cache; \ fi # Cleanup From de04d4e71a3d8f6db957b57ac57a0ba8d469c51f Mon Sep 17 00:00:00 2001 From: Eric Huang Date: Wed, 5 Nov 2025 13:45:24 -0800 Subject: [PATCH 3/3] fix: last_id when listing files in vector store # What does this PR do? ## Test Plan --- .../providers/utils/memory/openai_vector_store_mixin.py | 4 ++-- tests/integration/vector_io/test_openai_vector_stores.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/llama_stack/providers/utils/memory/openai_vector_store_mixin.py b/src/llama_stack/providers/utils/memory/openai_vector_store_mixin.py index 41d4cb2d7..dc305e74e 100644 --- a/src/llama_stack/providers/utils/memory/openai_vector_store_mixin.py +++ b/src/llama_stack/providers/utils/memory/openai_vector_store_mixin.py @@ -886,8 +886,8 @@ class OpenAIVectorStoreMixin(ABC): # Determine pagination info has_more = len(file_objects) > limit - first_id = file_objects[0].id if file_objects else None - last_id = file_objects[-1].id if file_objects else None + first_id = limited_files[0].id if file_objects else None + last_id = limited_files[-1].id if file_objects else None return VectorStoreListFilesResponse( data=limited_files, diff --git a/tests/integration/vector_io/test_openai_vector_stores.py b/tests/integration/vector_io/test_openai_vector_stores.py index 9da5dd25b..8ca29ee0c 100644 --- a/tests/integration/vector_io/test_openai_vector_stores.py +++ b/tests/integration/vector_io/test_openai_vector_stores.py @@ -825,7 +825,7 @@ def test_openai_vector_store_list_files( assert first_page.has_more assert len(first_page.data) == 2 assert first_page.first_id == first_page.data[0].id - assert first_page.last_id != first_page.data[-1].id + assert first_page.last_id == first_page.data[-1].id next_page = compat_client.vector_stores.files.list( vector_store_id=vector_store.id, limit=2, after=first_page.data[-1].id