LLMock: HTTP-based mocking server for deterministic LLM testing across processes

LLMock is a mocking server that intercepts LLM API calls by running as a real HTTP server on a specified port, allowing deterministic testing across multiple processes without hitting paid APIs.
Key Details
The tool was discovered after a developer spent $12 running Playwright tests against real OpenAI APIs. The problem occurred when using MSW (Mock Service Worker), which patches the HTTP module inside the Node.js process that calls server.listen(), but leaves separate processes (like a Python agent) completely blind to the mocking.
With LLMock, you point the OPENAI_BASE_URL environment variable at the mock server from every process, regardless of whether it's Node.js, Python, or any other language:
const mock = new LLMock({ port: 5555 });
await mock.start();
process.env.OPENAI_BASE_URL = "http://localhost:5555/v1";Fixtures are plain JSON files that match on user message substrings or regex patterns, eliminating handler boilerplate:
{
"fixtures": [
{
"match": { "userMessage": "stock price of AAPL" },
"response": { "content": "The current stock price of Apple Inc. (AAPL) is $150.25." }
}
]
}Key features from the source:
- Speaks actual OpenAI/Claude/Gemini SSE format correctly (getting event types wrong breaks streaming in subtle ways)
- Full tool call support - agent frameworks execute them normally
- Predicate routing for inspecting system prompt state or message history for multi-agent flows
- Request journal to assert on what was actually called, not just whether the test passed
- Zero dependencies
The developer ended up with 9 LLM calls across 3 Playwright tests, costing $0 and producing deterministic results every run.
📖 Read the full source: r/LocalLLaMA
👀 See Also

Spec27: Spec-Driven Validation for AI Agents – API-Level Testing Without Internal Access
Spec27 is a new tool from Safe Intelligence for spec-driven validation of AI agents. It tests agent behavior from the outside in, running adversarial and robustness checks against primary interfaces without needing SDKs, gateways, or internal traces.

Reflect MCP Server Implements Reflexion Paper for Persistent Coding Agent Memory
A developer implemented the Reflexion paper (Shinn et al., NeurIPS 2023) as an MCP server to give local coding agents persistent memory of their mistakes. The system uses regex-based pattern matching on error messages and stores lessons in SQLite with FTS5.

DocMason: Local Agent Knowledge Base for Complex Office Files
DocMason is a repo-native agent app that builds local knowledge bases from complex office documents like PPTX, DOCX, Excel, and PDFs. It runs entirely within Codex or Claude Code, maintaining document structure and providing traceable answers with provenance.

Launch Engine MCP Server Provides 39-Tool Pipeline for Business Validation
Launch Engine is an MCP server that gives Claude a structured pipeline with 39 interconnected SOP tools organized into 5 layers for taking business ideas from concept to validated revenue. The system includes specialized subagents, prerequisite enforcement, and tools for batch evaluation and rapid testing.