The AI Model Testing Framework now supports multiple AI providers for intelligent auto-fixing. You can choose between different AI models to analyze test failures and generate fixes, each with their own strengths and capabilities.
- Type: Local AI model via Ollama
- Strengths: Code-specialized, fast, privacy-focused, no API costs
- Requirements: Qwen model installed in Ollama
- Best for: Code issues, quick fixes, offline environments
- Type: Cloud AI service
- Strengths: Advanced reasoning, complex analysis, comprehensive solutions
- Requirements: Anthropic API key
- Best for: Complex issues, detailed analysis, when internet is available
./test.sh --auto-fix# Use Claude for advanced analysis
./test.sh --auto-fix --fixer=claude
# Use Qwen for fast local fixing (default)
./test.sh --auto-fix --fixer=qwen./test.sh --help-
Install Ollama (if not already installed):
curl -fsSL https://ollama.ai/install.sh | sh -
Install Qwen 2.5 Coder model:
# For systems with 16GB+ RAM ollama pull qwen2.5-coder:32b # For systems with 8GB+ RAM ollama pull qwen2.5-coder:7b
-
Verify installation:
ollama list
You should see
qwen2.5-coderin the list. -
Test the fixer:
./Scripts/AutoFixers/autofix_manager.py list
-
Get API Key from Anthropic:
- Go to: https://console.anthropic.com/
- Create an account or sign in
- Navigate to "API Keys" section
- Click "Create Key"
- Copy your API key
-
Set Environment Variable:
# Temporary (this session only) export ANTHROPIC_API_KEY="your-api-key-here" # Permanent (add to your ~/.bashrc or ~/.zshrc) echo 'export ANTHROPIC_API_KEY="your-api-key-here"' >> ~/.bashrc source ~/.bashrc
-
Install Required Python Package:
pip3 install requests
-
Verify setup:
./Scripts/AutoFixers/autofix_manager.py list
Claude should show as "✅ Available"
- ✅ You want fast, local processing
- ✅ Privacy is important (no data leaves your machine)
- ✅ You have limited internet or API costs are a concern
- ✅ Dealing with straightforward code issues
- ✅ Working in offline environments
- 🧠 You need advanced reasoning for complex issues
- 🧠 Problem requires deep analysis and context understanding
- 🧠 Previous simpler fixes haven't worked
- 🧠 You want detailed explanations and comprehensive solutions
- 🧠 Working with unusual or edge-case problems
Both fixers share the same memory system, which means:
- All fixes and attempts are stored together
- Knowledge learned from Claude can help Qwen and vice versa
- Historical context includes fixes from all providers
- Success rates and patterns are tracked across all fixers
./claude_memory.sh stats./Scripts/claude_memory_cli.sh patternsProblem: "Qwen model 'qwen2.5-coder:32b' is not available"
# Solution: Install the model
ollama pull qwen2.5-coder:32b
# Or use smaller version if you have limited RAM
ollama pull qwen2.5-coder:7bProblem: "ollama: command not found"
# Solution: Install Ollama
curl -fsSL https://ollama.ai/install.sh | shProblem: "❌ Analysis failed: API call failed"
# Check if API key is set
echo $ANTHROPIC_API_KEY
# If empty, set it:
export ANTHROPIC_API_KEY="your-api-key-here"Problem: "ModuleNotFoundError: No module named 'requests'"
# Solution: Install requests
pip3 install requestsProblem: "API key invalid" or "403 Forbidden"
- Your API key may be incorrect
- Visit https://console.anthropic.com/ to verify/regenerate
- Ensure you have credits in your Anthropic account
Problem: "❌ Unsupported fixer type: xyz"
# Solution: Use supported fixer types
./test.sh --auto-fix --fixer=qwen # or
./test.sh --auto-fix --fixer=claudeProblem: No fixers available
# Check status of all fixers
./Scripts/AutoFixers/autofix_manager.py list
# Set up at least one fixer following the setup guides above# Test a specific fixer on an issue file
./Scripts/AutoFixers/autofix_manager.py fix issue.json qwen
./Scripts/AutoFixers/autofix_manager.py fix issue.json claude./Scripts/AutoFixers/autofix_manager.py info qwen
./Scripts/AutoFixers/autofix_manager.py info claude# Use Claude directly
./Scripts/AutoFixers/claude_autofix.py issue.json
# Use Qwen directly
./Scripts/AutoFixers/qwen_autofix.py issue.json- Start with Qwen: It's faster and free, good for most issues
- Escalate to Claude: Use for complex problems that Qwen can't solve
- Check Memory: Review
./claude_memory.sh statsto see which fixer works best for your use cases - Monitor Costs: Claude usage incurs API costs, Qwen is free after initial setup
- ✅ All processing happens locally
- ✅ No data sent to external services
- ✅ Complete privacy and control
⚠️ Issue data is sent to Anthropic's servers for analysis⚠️ Follow your organization's data policies- ✅ Anthropic has strong privacy policies and data handling practices
- ✅ API communications are encrypted
To add support for additional AI providers:
- Create a new fixer file in
Scripts/AutoFixers/ - Implement the same interface as existing fixers:
analyze_issue(issue_data)apply_fix(fix_data)verify_fix(issue_data, fix_data)
- Update
autofix_manager.pyto include your new fixer - Add setup instructions to this documentation
- Issues: Report problems at your project's issue tracker
- Questions: Check the troubleshooting section above
- API Keys:
- Anthropic Claude: https://console.anthropic.com/
- Ollama setup: https://ollama.ai/
🚀 Ready to experience intelligent multi-provider AI fixing!