Show HN: LLM-mock – Record and replay OpenAI/Anthropic calls in pytest (v1.0)
Category: devtools
Tags: pytest-plugin, llm-testing, mock
Score: 5.8/10 (Innovation: 4, Technical: 5, Documentation: 7, Utility: 7)
llm-mock is a pytest plugin that records and replays OpenAI/Anthropic API calls by intercepting HTTP requests, enabling deterministic, offline, and cost-free testing of LLM-dependent code. It solves the practical problems of flaky, expensive, and credential-dependent AI integration tests with a clean record/replay workflow.
Target audience: backend devs, data engineers
Repository: https://github.com/autopost/llm-mock · Python · MIT
View on Hacker News