Inspiration: A Bug, A Conference, and a Weekend Lost
This all started not as a product, but as a frustration. After presenting my earlier research at MSR in Portugal, I returned home energized to continue one of my 3-year-old side projects only to be met with a brutal surprise: Pydantic and SQLAlchemy had migrated to 2.x My project was broken. Deprecation had silently crept in. My weekend was gone.
That’s when it hit me: Why can’t systems fix themselves? Can’t LLMs already do that?
API evolution is one of software engineering’s oldest, most persistent problems, haunting us since the days of floppy disks. And it’s still far from being solved.
LLMs should be able to help, right? That’s what I thought until I tried. The models back then just hadn’t seen enough of Pydantic’s newer methods. They kept suggesting old, deprecated APIs. And as I refactored file after file, I noticed a pattern: sometimes they got it right, but often, they missed the mark completely.
It wasn’t just frustrating. It was a clear sign: the fixer needs fixing.
Fueled by that moment, I dove deep into how libraries change, how language evolves, and why migrations are still manual nightmares. My under-review paper explores similarity search for solving deprecations with a novel twist (stay tuned!). But that wasn’t enough. But similarity search can only take us so far. What we really need is something more intelligent a system that can consume massive amounts of text, reason across sources, and research replacements the way a human developer would. Reason and Research.... Reason and Research...... sounds Familiar ??
Enter Perplexity’s Hackathon and with it, free credits (thank you!) for their new Sonar Reasoning and Sonar Deep Research APIs. That changed everything ...
What It Does: Meet Method Sentinel
Method Sentinel is a toolchain built to detect, trace, and suggest replacements for deprecated or hallucinated Python API methods in AI-generated or human-written code.
- It watches your code (through a Chrome plugin or web interface).
- It flags deprecated methods, identifies the last version they were supported in, and...
- It calls in Sonar Deep Research to crawl through GitHub issues, release notes, StackOverflow, Reddit, and official docs to recommend verified replacements -> with citations.
LLMs can write beautiful code, but being accurate is not their strong suit. Method Sentinel bridges that gap.
How We Built It: Sonar as the Brain, SURF as the Spine
Step 1: Build a Complete Log of APIs
We compiled a comprehensive history of every method, class, and version across six major Python libraries. That’s over 10 million methods mined from GitHub and documentation. This took three weeks on a student budget, and a lot of patience.
Step 2: Detect Hallucinations and Deprecations
We scan code for methods that:
- Don’t exist in any version → flag as hallucinated.
- Existed in older versions but not in the current version → flag as deprecated.
Step 3: Enter Sonar
Using Sonar’s Deep Research & Reasoning Models, we fetch only verifiable, cited, and trustworthy replacement methods.
- Sonar Models enables scraping Reddit threads, StackOverflow debates, GitHub issues, and changelogs all in one search, helping in tracing multi-step deprecation chains and corner-case migrations that even the docs don’t explain well.
Why Sonar Works Here
Sonar isn’t a copy-paste search. It’s designed to reason and research, exactly what API migration demands. Where traditional models surface a GitHub README, Sonar surfaces:
- Reddit debates with accepted solutions
- GitHub issue chains with maintainer responses
- Documentation buried in obscure release notes
And it brings all this with citations, which means developers don’t just trust it—they verify it.
What We’ve Built So Far
- ✅ Chrome Plugin: Scans Perplexity chats for deprecated code suggestions. It adds a small icon next to each generated code block. Click it to scan the snippet with Method Sentinel. GitHub: Plugin
- ✅ Web App: Paste your code and get instant feedback on deprecated APIs GitHub: WebApp
- ✅ API Backend: Handles parsing, matching, version tracking, and Sonar queries GitHub: API Repo
Detailed READMEs are available on the repo to help you run the projects locally.
What’s Next: LLM Watchdog + Repair Engine
This is just the beginning.
The real future lies in embedding Method Sentinel behind LLMs—silently monitoring their outputs, catching hallucinated or deprecated code, and correcting it before it ever hits production. No user prompts. No warnings. Just invisible, self-repairing systems.
Imagine Method Sentinel working seamlessly in the background:
- In your chat windows – suggesting fixes as LLMs generate code
- In your code editors – flagging outdated APIs and offering updates in real time
- In your terminal – validating scripts and recommending improvements before execution
Because in a world where AI writes our code, we need something watching the watchers.
Built With
- 🧠 Sonar Deep Research API – for source-backed method recommendations
- 🧩 Python AST Parsing – to extract, track, and flag method usage
- 💡 Chrome Extension – to scan Perplexity chats in real time
- ⚙️ Backend: FastAPI, PostgreSQL
- 🌐 Frontend: React, Type Script
- 🚀 Deployment: Vercel
DISCLAIMER: This project was built entirely over a weekend, with invaluable support from Perplexity and Bolt.new, both of which significantly accelerated development and research. While inspired by my ongoing academic work, this is a standalone effort. I used my previously validated sample set to benchmark how well real-world tools can tackle the problem at scale. Happy to share the pre-print upon request.
Built With
- chrome
- fastapi
- github
- github-api
- postgresql
- python
- python-ast-parsing
- react
- semantic-similarity-(custom-embeddings)
- sonar-deep-research-api
- tailwind-css
- vercel
Log in or sign up for Devpost to join the conversation.