WIP feat: Add MLflow Prompt Registry provider #4170
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
MLflow Prompt Registry Provider
🛑 DO NOT MERGE 🛑
This PR illustrates the intended use of PR #4166 and PR #4168 which it has as dependencies.
Summary
This PR adds a new remote MLflow provider for the Prompts API, enabling centralized prompt management and versioning using MLflow's Prompt Registry (MLflow 3.4+).
What's New
Remote Provider:
remote::mlflowA production-ready provider that integrates Llama Stack's Prompts API with MLflow's centralized prompt registry, supporting:
{{ variable }}placeholdersKey Features
1. Full CRUD Operations
2. Deterministic ID Mapping
pmpt_<48-hex-chars>llama_prompt_<48-hex-chars>3. Automatic Variable Extraction
4. Configuration
Implementation Details
Files Added
Provider Implementation:
src/llama_stack/providers/registry/prompts.py- Provider registrysrc/llama_stack/providers/remote/prompts/mlflow/config.py- Configuration schemasrc/llama_stack/providers/remote/prompts/mlflow/mapping.py- ID mapping utilitiessrc/llama_stack/providers/remote/prompts/mlflow/mlflow.py- Main adapter (520 lines)Documentation:
docs/docs/providers/prompts/remote_mlflow.mdx- Comprehensive user guidetests/integration/providers/remote/prompts/mlflow/README.md- Testing guideTests:
Testing Summary
All Tests Passing
*One non-critical test skipped (cache stats not applicable to this provider)
Integration Test Coverage:
Breaking Changes
None. This is a new provider addition.
Dependencies
mlflow>=3.4.0(added to provider pip_packages)Usage Example
1. Start MLflow Server
2. Configure Llama Stack
3. Use Prompts API
Review Notes
Architecture Decisions
Known Limitations
delete_prompt()raisesNotImplementedErrorFuture Enhancements
Checklist
How to Test
Quick Test
Full Test Suite
Related Issues
This implements the Prompts API provider for MLflow Prompt Registry, enabling: