deniz.in

Markets

Weather

Loading weather

· via dev.to (home feed)

aimock crosses 2.5M weekly installs with offline, deterministic mocks for AI services

The open-source mock server for LLMs, MCP tools and vector databases says it has passed 2.5 million weekly installs, letting AI test suites run offline without spending tokens.

aimock crosses 2.5M weekly installs with offline, deterministic mocks for AI services

The open-source testing tool aimock has passed 2.5 million weekly installs, according to an announcement published on dev.to by the team behind CopilotKit. The post also reports more than 900 GitHub stars and says the tool now runs in the test suites of projects including OpenClaw, TanStack, Mastra, Composio and the AG-UI protocol. These figures are the project's own claims, published in a promotional post, and have not been independently verified.

What the tool does

aimock is a mock server that stands in for the AI services an application talks to: chat models, agentic protocols, vector databases, and image, speech and transcription endpoints. A developer writes a JSON fixture pairing a matched input with a canned response, starts the server locally, and points the application's API base URL at it rather than at a live provider. Test suites then run offline in milliseconds, consume no tokens and return the same result on every run — no provider outages or rate limits to break a build, and no API keys needed just to execute the tests.

The dev.to post shows a three-step setup: a fixture file matching a user message to a reply, launching the server with a single npx command, and exporting an environment variable such as OPENAI_BASE_URL that points at the local port (4010 in the example).

Provider coverage

According to the announcement, aimock ships ready-made fixtures covering a wide slice of the AI stack:

  • Chat model providers: OpenAI, Claude, Gemini, Bedrock, Azure, Vertex AI, Ollama, Cohere and OpenRouter.
  • Agent protocols: MCP, A2A and AG-UI.
  • Vector databases: Pinecone, Qdrant and ChromaDB.
  • Multimedia endpoints: image generation, text-to-speech, transcription and video generation.
  • Adjacent services: Tavily search, Cohere rerank, OpenAI moderation and ElevenLabs.

Recent releases extend it past canned responses

The post says newer releases are designed to move the tool beyond simple stubbing:

  • Record & Replay captures live API traffic once during development, then replays those captured responses in CI, so a suite exercises exactly the response shapes a provider actually returned.
  • Drift Detection watches for model providers silently changing their response schemas and reports such changes within 24 hours, surfacing breakage in CI before it reaches users.
  • Chaos Testing injects latency, timeouts and error responses on demand, letting teams exercise the failure conditions that real providers do produce.
  • First-class MCP and A2A support means agentic workflows can be mocked with the same fixture syntax used for ordinary chat completions.

The package is MIT-licensed, published to npm as @copilotkit/aimock, and documented on the CopilotKit site.

Why it matters

Anyone building on top of an LLM API knows the testing problem: suites that call live endpoints spend tokens on every CI run, fail unpredictably when a provider hiccups, and require every developer on the team to hold working API keys. aimock's pitch is that the AI layer of an application can be treated like any other external dependency — mocked, recorded, replayed and deliberately broken under controlled conditions.

The headline install number suggests the pain is widely shared. More telling is the feature set, which targets the two standard objections to mocking AI services: that hand-written fixtures drift out of sync with what providers actually return — addressed by record/replay and drift detection — and that happy-path mocks hide how an app behaves when a provider is slow, down or erroring — addressed by chaos testing. First-class support for agent protocols such as MCP and A2A also tracks where the ecosystem is heading, as more applications orchestrate tools and agents rather than single chat calls.

  • #testing
  • #mocking
  • #ai
  • #open-source
  • #developer-tools

Related posts