All featured projects

03 · M.Tech Research · Academic / Research Project

Self-Healing API Clients with Tiered Routing

Designed and evaluated a framework for resilient API interactions under runtime schema/API changes using LLM reasoning and tiered routing.

Problem

healing proxy · request traceschema drift detected

01 Failure detected

POST /v2/orders
→ 422 Unprocessable
  "customer_id" unknown
  expected "customerId"

02 Classify & route

class: field rename
simple → local LLM (Ollama)
complex → GPT-4o-mini

03 Adapt & cache

transform:
  customer_id → customerId
retry → 201 Created
cached for next call
Illustrative trace with a fictional API — research prototype, not a production system.

API schema drift — renamed fields, changed payload shapes, new versions — breaks client requests at runtime and forces manual client-side patches.

Why it mattered

Integrations fail silently or loudly until a developer investigates and patches the client. The research asks whether a client can detect, classify and adapt to these changes itself.

Approach

A middleware healing proxy sits between the client and the target API. It detects broken requests, classifies the failure and routes it by complexity: simple cases to a local model, complex cases to a cloud model. Repairs are grounded with a RAG pipeline over API specification knowledge and stored in a transform cache for reuse.

How it works

  1. 01Runtime API / schema change
  2. 02Failure detection
  3. 03Failure classification
  4. 04Tiered routing
  5. 05LLM reasoning
  6. 06Transformation / adaptation
  7. 07Resilient API interaction

Architecture

  • Runtime schema/API change detection
  • Failure classification
  • Tiered routing: simple → Ollama (Llama 3 / CodeLlama)
  • Tiered routing: complex → GPT-4o-mini
  • RAG pipeline over specification knowledge (ChromaDB)
  • Transform cache for repeated repairs
  • Streamlit observability dashboard
  • Automated evaluation harness

Results / evaluation

Compared

Local-only routing

Compared

Cloud-only routing

Compared

Tiered routing

50-case automated evaluation comparing local-only, cloud-only and tiered routing approaches.

My contribution

Individual M.Tech research in Software Engineering at BITS Pilani (WILP) — design, implementation and evaluation of the framework. This is an academic research prototype, not a production deployment.

Technology

PythonFastAPIOllamaLlama 3CodeLlamaGPT-4o-miniChromaDBStreamlitDocker