Merge de04d4e71a into sapling-pr-archive-ehhuang

This commit is contained in:
ehhuang 2025-11-05 13:45:40 -08:00 committed by GitHub
commit 005e7ebd75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 17 additions and 13 deletions

View file

@ -47,7 +47,7 @@ RUN set -eux; \
exit 1; \ exit 1; \
fi fi
RUN pip install --no-cache-dir uv RUN pip install --no-cache uv
ENV UV_SYSTEM_PYTHON=1 ENV UV_SYSTEM_PYTHON=1
ENV INSTALL_MODE=${INSTALL_MODE} 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; \ echo "LLAMA_STACK_CLIENT_DIR is set but $LLAMA_STACK_CLIENT_DIR does not exist" >&2; \
exit 1; \ exit 1; \
fi; \ fi; \
uv pip install --no-cache-dir -e "$LLAMA_STACK_CLIENT_DIR"; \ uv pip install --no-cache -e "$LLAMA_STACK_CLIENT_DIR"; \
fi; fi;
# Install llama-stack # Install llama-stack
@ -88,22 +88,22 @@ RUN set -eux; \
fi; \ fi; \
if [ -n "$SAVED_UV_EXTRA_INDEX_URL" ] && [ -n "$SAVED_UV_INDEX_STRATEGY" ]; then \ 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_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 \ else \
uv pip install --no-cache-dir -e "$LLAMA_STACK_DIR"; \ uv pip install --no-cache -e "$LLAMA_STACK_DIR"; \
fi; \ fi; \
elif [ "$INSTALL_MODE" = "test-pypi" ]; then \ 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 \ 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 \ 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; \ fi; \
else \ else \
if [ -n "$PYPI_VERSION" ]; then \ 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 \ else \
uv pip install --no-cache-dir llama-stack; \ uv pip install --no-cache llama-stack; \
fi; \ fi; \
fi; fi;
@ -117,7 +117,7 @@ RUN set -eux; \
fi; \ fi; \
deps="$(llama stack list-deps "$DISTRO_NAME")"; \ deps="$(llama stack list-deps "$DISTRO_NAME")"; \
if [ -n "$deps" ]; then \ 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 fi
# Cleanup # Cleanup

View file

@ -46,6 +46,10 @@ class StackListDeps(Subcommand):
def _run_stack_list_deps_command(self, args: argparse.Namespace) -> None: def _run_stack_list_deps_command(self, args: argparse.Namespace) -> None:
# always keep implementation completely silo-ed away from CLI so CLI # always keep implementation completely silo-ed away from CLI so CLI
# can be fast to load and reduces dependencies # 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 from ._list_deps import run_stack_list_deps_command
return run_stack_list_deps_command(args) return run_stack_list_deps_command(args)

View file

@ -886,8 +886,8 @@ class OpenAIVectorStoreMixin(ABC):
# Determine pagination info # Determine pagination info
has_more = len(file_objects) > limit has_more = len(file_objects) > limit
first_id = file_objects[0].id if file_objects else None first_id = limited_files[0].id if file_objects else None
last_id = file_objects[-1].id if file_objects else None last_id = limited_files[-1].id if file_objects else None
return VectorStoreListFilesResponse( return VectorStoreListFilesResponse(
data=limited_files, data=limited_files,

View file

@ -825,7 +825,7 @@ def test_openai_vector_store_list_files(
assert first_page.has_more assert first_page.has_more
assert len(first_page.data) == 2 assert len(first_page.data) == 2
assert first_page.first_id == first_page.data[0].id 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( next_page = compat_client.vector_stores.files.list(
vector_store_id=vector_store.id, limit=2, after=first_page.data[-1].id vector_store_id=vector_store.id, limit=2, after=first_page.data[-1].id