Commit dd0758c
feat: Add MLflow Prompt Registry provider
This commit adds a new remote provider for the Prompts API that integrates
with MLflow's Prompt Registry (MLflow 3.4+), enabling centralized prompt
management and versioning.
Key features:
- Full CRUD operations (create, read, update, list)
- Immutable version control with default version management
- Automatic variable extraction from {{ variable }} placeholders
- Deterministic ID mapping between Llama Stack and MLflow
- Comprehensive test coverage (41 unit + 14 integration tests)
Provider implementation:
- src/llama_stack/providers/remote/prompts/mlflow/
- config.py: Configuration schema with validation
- mapping.py: ID mapping and metadata utilities
- mlflow.py: Main adapter implementation (520 lines)
- src/llama_stack/providers/registry/prompts.py: Provider registration
Testing:
- tests/unit/providers/remote/prompts/mlflow/
- test_config.py: 14 configuration tests
- test_mapping.py: 27 ID mapping tests
- tests/integration/providers/remote/prompts/mlflow/
- test_end_to_end.py: 14 end-to-end scenarios
- conftest.py: Test fixtures and server availability checks
- README.md: Testing documentation
- scripts/test_mlflow_prompts_manual.py: Manual validation script
Documentation:
- docs/docs/providers/prompts/remote_mlflow.mdx: User guide
- docs/docs/providers/prompts/index.mdx: Provider category index
Dependencies:
- Requires mlflow>=3.4.0 (added to provider pip_packages)
Limitations:
- No deletion support (MLflow constraint)
- Sequential version numbers only (1, 2, 3...)
Signed-off-by: William Caban <[email protected]>
Co-Authored-By: Claude <[email protected]>1 parent 97f535c commit dd0758c
File tree
18 files changed
+2760
-0
lines changed- docs/docs/providers/prompts
- scripts
- src/llama_stack/providers
- registry
- remote/prompts
- mlflow
- tests
- integration/providers/remote/prompts
- mlflow
- unit/providers/remote/prompts
- mlflow
18 files changed
+2760
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments