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
01 Failure detected
POST /v2/orders → 422 Unprocessable "customer_id" unknown expected "customerId"
02 Classify & route
03 Adapt & cache
transform: customer_id → customerId retry → 201 Created cached for next call
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
- 01Runtime API / schema change
- 02Failure detection
- 03Failure classification
- 04Tiered routing
- 05LLM reasoning
- 06Transformation / adaptation
- 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
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.