What problem does it solve?
Provide a consistent, safe workflow to triage and resolve image generation failures from OpenAI and Gemini providers for the Sketch Magic /api/convert endpoint, avoiding accidental exposure of API keys or raw image bytes.
Core Features & Use Cases
- Configuration validation: Check environment variables like OPENAI_API_KEY, GEMINI_API_KEY, DEFAULT_PROVIDER, and model settings against supported models.
- Controlled reproduction: Reproduce failures with a tiny PNG and short prompt using multipart requests while keeping server and client logs visible.
- Failure interpretation & remediation: Distinguish 500 provider errors, 400 input errors, timeouts, quota or model-mismatch issues, and apply fixes such as model swap, image reduction, or SDK version alignment.
- Safe reporting: Summarize error codes, timings, and non-sensitive metadata for bug reports without logging secrets or raw image data.
- Use case: Triage intermittent 500 errors from a deployed Sketch Magic instance that only occur with certain image sizes or provider model selections.
Quick Start
Use the sketch-ai-provider-debug skill to reproduce a failing /api/convert call with a tiny PNG and a short prompt while capturing server and client logs and avoiding any logging of API keys or raw image bytes.