Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

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

LLM-mock is a Python library that lets developers record responses from real LLM APIs (OpenAI, Anthropic, etc.) and replay them during testing, eliminating the need to call live APIs in tests. It works as a drop-in replacement for client libraries, making tests faster, deterministic, and cheaper without changing application code.