Back to browse
LLM-mock – Record real LLM API responses once, replay them in tests

LLM-mock – Record real LLM API responses once, replay them in tests

by roman_t·May 22, 2026·1 point·0 comments

AI Analysis

●●●BangerSolve My ProblemBig Brain

Intercepts HTTP transport layer so production code needs zero changes.

Strengths
  • Human-readable JSON fixtures make debugging test failures straightforward.
  • pytest decorator integration avoids context managers inside test functions.
  • Eliminates non-determinism and cost from CI runs hitting real APIs.
Weaknesses
  • Only supports httpx-based clients; requests library users need adapters.
  • No built-in fixture diffing to detect when upstream model behavior drifts.
Target Audience

Python developers writing integration tests for LLM-powered apps

Similar To

VCR.py · Betamax · responses

Similar Projects