Enforce that all imports from llama-stack-api use the form:
from llama_stack_api import <symbol>
This prevents external code from accessing internal package structure
(e.g., llama_stack_api.agents, llama_stack_api.common.*) and establishes
a clear public API boundary.
Changes:
- Export 400+ symbols from llama_stack_api/__init__.py
- Include all API types, common utilities, and strong_typing helpers
- Update files across src/llama_stack, docs/, tests/, scripts/
- Convert all submodule imports to top-level imports
- ensure docs use the proper importing structure
Addresses PR review feedback requiring explicit __all__ definition to
prevent "peeking inside" the API package.
Signed-off-by: Charlie Doern <cdoern@redhat.com>
move llama_stack_api.apis... to top level llama_stack_api.
merge provider datatypes and the existing apis.datatypes into a common llama_stack_api.datatypes
update all usages of these packages throughout LLS
Signed-off-by: Charlie Doern <cdoern@redhat.com>
Extract API definitions, models, and provider specifications into a
standalone llama-stack-api package that can be published to PyPI
independently of the main llama-stack server.
Motivation
External providers currently import from llama-stack, which overrides
the installed version and causes dependency conflicts. This separation
allows external providers to:
- Install only the type definitions they need without server dependencies
- Avoid version conflicts with the installed llama-stack package
- Be versioned and released independently
This enables us to re-enable external provider module tests that were
previously blocked by these import conflicts.
Changes
- Created llama-stack-api package with minimal dependencies (pydantic, jsonschema)
- Moved APIs, providers datatypes, strong_typing, and schema_utils
- Updated all imports from llama_stack.* to llama_stack_api.*
- Preserved git history using git mv for moved files
- Configured local editable install for development workflow
- Updated linting and type-checking configuration for both packages
- Rebased on top of upstream src/ layout changes
Testing
Package builds successfully and can be imported independently.
All pre-commit hooks pass with expected exclusions maintained.
Next Steps
- Publish llama-stack-api to PyPI
- Update external provider dependencies
- Re-enable external provider module tests
Signed-off-by: Charlie Doern <cdoern@redhat.com>
RAG aka file search is implemented via the Responses API by specifying
the file-search tool. The backend implementation remains unchanged. This
PR merely removes the directly exposed API surface which allowed users
to directly perform searches from the client.
This facility is now available via the `client.vector_store.search()`
OpenAI compatible API.
# What does this PR do?
This API hasn't received any traction and close to zero interest from
the community. Let's revisit in the future if things change.
Signed-off-by: Sébastien Han <seb@redhat.com>
Co-authored-by: Ashwin Bharambe <ashwin.bharambe@gmail.com>
Migrates package structure to src/ layout following Python packaging
best practices.
All code moved from `llama_stack/` to `src/llama_stack/`. Public API
unchanged - imports remain `import llama_stack.*`.
Updated build configs, pre-commit hooks, scripts, and GitHub workflows
accordingly. All hooks pass, package builds cleanly.
**Developer note**: Reinstall after pulling: `pip install -e .`