ai-patch
v0.1.4
Published
Fix-first incident patcher for AI API issues - diagnose streaming, retries, cost, and traceability problems
Maintainers
Readme
AI Patch Doctor 🔍⚕️
Fix AI API issues in under 60 seconds - diagnose streaming, retries, cost, and traceability problems
AI Patch Doctor is a command-line tool that helps developers diagnose and fix common AI API issues quickly. It provides interactive diagnostics for OpenAI, Anthropic Claude, Google Gemini, and any OpenAI-compatible API.
🚀 Quick Start
# No installation needed - use npx
npx ai-patch doctor
# Or install globally
npm install -g ai-patch
ai-patch doctor✨ Key Features
- 4 Core Diagnostics: Streaming, Retries, Cost, and Traceability checks
- Multi-Provider Support: OpenAI, Anthropic, Gemini, and OpenAI-compatible APIs
- Interactive Mode: Simple 2-question flow to get started
- Auto-Detection: Automatically detects API configuration from environment
- Detailed Reports: JSON and Markdown reports with specific fix recommendations
🔬 What It Checks
- Streaming Check - SSE stalls, buffering issues, partial output problems
- Retries Check - Rate limit storms, retry chaos, exponential backoff
- Cost Check - Token spikes, unbounded requests, cost optimization
- Traceability Check - Request IDs, correlation tracking, duplicate detection
💻 Usage
# Interactive mode (recommended)
ai-patch doctor
# Run specific check
ai-patch doctor --target=streaming
# Run all checks
ai-patch doctor --target=all📖 Full Documentation
For complete documentation, examples, and advanced usage, visit:
- GitHub Repository: github.com/michaelbrinkworth/ai-patch-doctor
- Issue Tracker: github.com/michaelbrinkworth/ai-patch-doctor/issues
📄 License
MIT License - see LICENSE file for details.
Run the doctor. Fix your AI API. ⚕️
