5 AI Providers for Auto-fixing Breaking API Changes
BreakShield CI detects breaking changes using pure AST analysis — no AI in the detection loop. But when it finds a breaking change, the next question is: how do we fix it?
That's where AI comes in. We now support 5 providers, each with different strengths.
The detection → fix pipeline
Here's how it works:
- AST detects — ts-morph finds a removed field, changed type, or deleted endpoint
- Context is gathered — the affected file content, change type, before/after schemas
- AI generates a fix — your chosen provider rewrites the affected code
- PR is created — a new branch with the fix, ready for review
The AI never decides what's breaking — that's deterministic AST analysis with 80-95% confidence. AI only handles the creative part: generating correct code.
Provider comparison
Google Gemini (recommended for free tier)
Gemini 2.5 Flash is our default. It's fast, free (1,500 requests/day), and handles most TypeScript fixes well. For complex refactoring, Gemini 2.5 Pro has a 1M token context window.
- Best for: quick fixes, simple field additions, type changes
- Free tier: yes (generous)
- Speed: very fast
OpenAI GPT-5.x
GPT-5.4 and 5.5 are excellent at understanding complex TypeScript patterns. They produce clean, idiomatic code and handle edge cases well.
- Best for: complex refactoring, multi-file implications
- Free tier: no
- Speed: fast
Anthropic Claude
Claude Sonnet 4.6 and Opus 4.8 are arguably the best at code generation right now. They understand nuanced TypeScript patterns and produce fewer errors. If you need the highest success rate, use Claude.
- Best for: complex breaking changes, nuanced code rewrites
- Free tier: no
- Speed: moderate
Groq (recommended for speed + free)
Groq runs open-source models at incredible speed. Llama 3.3 70B is fast and free — great for simple fixes. The new GPT-OSS 120B is surprisingly capable.
- Best for: simple fixes, speed-critical workflows
- Free tier: yes (all models)
- Speed: fastest
Perplexity Sonar
Perplexity is unique — it can search the web while generating fixes. This is useful when the fix requires understanding an external API that changed. Sonar Deep Research goes deep.
- Best for: fixes requiring external context/documentation
- Free tier: no
- Speed: moderate
Which one should you use?
Our recommendation:
- Free + simple fixes → Gemini 2.5 Flash or Groq Llama 3.3 70B
- Best quality → Claude Sonnet 4.6 or GPT-5.4
- Complex refactoring → Claude Opus 4.8 or GPT-5.5
- Fastest response → Groq
BYOK — Bring Your Own Key
All providers use your own API key. We never see or store it in plaintext — it's encrypted in your Supabase user_settings row. You can test your key works with one click in the Settings panel.
Configure it in the Analyze page (click ⚙ AI Settings) or in the Dashboard under Settings.
Try it now
Paste any GitHub PR URL into the analyzer, find a breaking change, and click "Suggest fix with AI". It takes about 5 seconds from click to PR.