{"slug": "aimock-deterministic-mock-infra-for-ai-apps", "title": "aimock: Deterministic Mock Infra for AI Apps", "summary": "CopilotKit's open-source mock server aimock has surpassed 2.5 million weekly installs, providing deterministic test infrastructure for AI applications. The tool allows developers to mock LLM endpoints, MCP tools, vector databases, and other AI services, enabling offline, token-free testing with features like record-and-replay, drift detection, and chaos testing.", "body_md": "aimock crossed 2.5M weekly installs!\n\nIf you've been building AI apps, you've probably hit the same wall: your test suite runs against real LLM endpoints, so every CI run burns tokens, every provider hiccup breaks your build, and every dev on your team needs API keys just to run npm test.\n\naimock is our fix for that.\n\nIt's an [open-source mock server](https://github.com/CopilotKit/aimock) for every AI service your app talks to - LLMs, MCP tools, agentic protocols, vector databases, image models, TTS. You write a JSON fixture, point your API URL at localhost, and your tests run offline in milliseconds. Zero tokens, zero flake, deterministic every run.\n\nIt just crossed **2.5M weekly installs** with 900+ GitHub stars, and it's quietly powering the test suites at **OpenClaw, TanStack, Mastra, Composio, the AG-UI protocol** and others.\n\n**The 3-line setup**\n\n```\n1. fixture.json\n   { \"match\":    { \"userMessage\": \"Hello\" },\n     \"response\": { \"content\": \"Hi!\" } }\n\n2. $ npx aimock -f fixture.json\n\n3. $ export OPENAI_BASE_URL=http://localhost:4010\n```\n\nOut of the box, aimock ships fixtures for:\n\nLLMs : OpenAI, Claude, Gemini, Bedrock, Azure, Vertex AI, Ollama, Cohere, OpenRouter\n\nProtocols : MCP, A2A, AG-UI\n\nVector DBs : Pinecone, Qdrant, ChromaDB\n\nMultimedia : image generation, TTS, transcription, video generation\n\nServices : Tavily search, Cohere rerank, OpenAI moderation, ElevenLabs\n\nRecent releases have focused on making aimock behave less like a stub and more like a real test harness:\n\nRecord & Replay : capture live API traffic once in development, replay it forever in CI. Your test suite becomes a bit-exact snapshot of what production actually returns.\n\nDrift Detection : LLM providers silently change response shapes. aimock catches those changes within 24 hours, so your CI fails before your users do.\n\nChaos Testing : inject latency, timeouts, and error responses on demand. Prove your app handles the messy paths real providers actually produce.\n\nFirst-class MCP + A2A support : mock agentic protocols with the same fixture syntax you'd use for a chat completion.\n\nGetting started\n\nInstall - `npm install @copilotkit/aimock`\n\nSite & docs - [aimock.copilotkit.dev](https://aimock.copilotkit.dev/)\n\nGitHub - [github.com/CopilotKit/aimock](https://github.com/CopilotKit/aimock)\n\nMIT-licensed, open source, from the team at CopilotKit. If you're testing anything that talks to an LLM, aimock belongs in your CI.\n\nThanks for reading!!", "url": "https://wpnews.pro/news/aimock-deterministic-mock-infra-for-ai-apps", "canonical_source": "https://dev.to/anmolbaranwal/aimock-deterministic-mock-infra-for-ai-apps-2k3c", "published_at": "2026-09-01 11:30:00+00:00", "updated_at": "2026-09-01 11:53:27.008161+00:00", "lang": "en", "topics": ["developer-tools", "ai-infrastructure", "ai-tools", "mlops"], "entities": ["CopilotKit", "aimock", "OpenClaw", "TanStack", "Mastra", "Composio", "AG-UI"], "alternates": {"html": "https://wpnews.pro/news/aimock-deterministic-mock-infra-for-ai-apps", "markdown": "https://wpnews.pro/news/aimock-deterministic-mock-infra-for-ai-apps.md", "text": "https://wpnews.pro/news/aimock-deterministic-mock-infra-for-ai-apps.txt", "jsonld": "https://wpnews.pro/news/aimock-deterministic-mock-infra-for-ai-apps.jsonld"}}