microsoft / microsoft/amplifier
feat: module validation errors should include install hint when dependency is missing
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.1k
- Forks
- 261
- Avg merge
- 3h 28m
- Merged PRs (30d)
- 13
Description
Summary
When a module fails the module_importable validation check due to a missing Python dependency, the error message only states the missing module name. It should also provide the exact command the user needs to run to resolve it.
Current behavior
Failed to load module 'tool-media-pipeline': Module 'tool-media-pipeline' failed validation:
FAILED: 0/1 checks passed (1 errors, 0 warnings).
Errors: module_importable: Failed to import module: No module named 'edge_tts'
The user must then figure out on their own:
- That
edge_ttsmaps to the PyPI packageedge-tts(different spelling) - That Amplifier is installed via
uv tooland cannot use a plainpip install - The correct fix:
uv tool install --with edge-tts amplifier
Desired behavior
The validation error should include a human-readable install hint:
Failed to load module 'tool-media-pipeline': missing dependency 'edge_tts'
Fix: uv tool install --with edge-tts amplifier
Broader opportunity
Modules already know what they import. If modules could optionally declare a pypi_package mapping alongside their imports (e.g. edge_tts -> edge-tts), the loader could:
- Detect the missing import
- Look up the correct PyPI package name
- Surface the exact
uv tool install --with <package> amplifiercommand in the error
This would close the UX gap for any module with optional dependencies — TTS providers, OCR libraries, cloud SDKs, etc. — without requiring auto-installation (which carries security implications).
Context
- Amplifier is installed as a
uvisolated tool, sopip installdoesn't work - Auto-install at runtime would have security implications and is not requested here
- The ask is purely better error messaging + optional dependency declaration so the loader can generate the right hint
Affected module
tool-media-pipeline (requires edge-tts, which is not bundled by default)
Labels
enhancement, dx, module-loader
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the module_importable validation check and the tool-media-pipeline module, then trace how missing Python imports are reported and how modules declare dependencies. Define the optional import-to-PyPI mapping and verify that a missing edge_tts dependency produces the requested uv tool install hint without auto-installing packages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100