This example shows how to integrate llx for intelligent code generation within pyqual quality pipelines.
LLX enhances pyqual by:
- Analyzing project metrics (files, lines, complexity, duplication)
- Selecting the optimal LLM model based on actual code metrics
- Generating targeted fixes using the selected model
pyqual-llx.yaml- Complete pipeline configuration with llx integrationREADME.md- This file
-
Install dependencies:
pip install llx[prellm] pyqual code2llm vallm
-
Copy the configuration:
cp pyqual-llx.yaml ../../pyqual.yaml
-
Run the pipeline:
cd ../.. pyqual run
- Analyze:
code2llmcollects project metrics - Validate:
vallmidentifies issues and creates error report - Fix:
llx fixreads errors, selects optimal model, generates fixes - Test: Run tests to verify fixes
- Loop: Repeat until all quality gates pass
LLX automatically selects models based on project metrics:
| Project Size | Files | Lines | Selected Model |
|---|---|---|---|
| Small | <3 | <500 | Free (Gemini 2.5 Pro) |
| Medium | 3-10 | 500-5K | Cheap (Claude Haiku 4.5) |
| Large | 10-50 | 5K-20K | Balanced (Claude Sonnet 4) |
| Very Large | 50+ | 20K+ | Premium (Claude Opus 4) |
See the full documentation for:
- Custom model thresholds
- Advanced configuration options
- Error handling strategies
- Best practices