What it does
aimock is a local mock server for testing AI applications. It simulates 14 LLM providers (OpenAI, Anthropic Claude, Gemini, Bedrock, Ollama, and others), multimedia services (image generation, text-to-speech, transcription, video), MCP tool execution, vector databases (Pinecone, Qdrant, ChromaDB), and supporting APIs (search, reranking, moderation). It runs on a single port with zero production dependencies and supports recording real API calls as fixtures for deterministic replay in tests, including timing-aware reproduction of streaming behavior.
Who it's for
Backend developers and QA engineers testing AI-powered applications, particularly those with multiple LLM provider integrations, tool execution, vector retrieval, or multimedia processing. Common in CI/CD environments where isolating external API dependencies reduces costs and iteration time.
Common use cases
- Unit test LLM-dependent code paths without incurring OpenAI, Anthropic, or other provider costs
- Record multi-turn production conversations and tool-calling traces, replay them deterministically in CI
- Validate MCP tool execution, A2A (agent-to-agent), and AG-UI (agent-to-UI) event streams
- Test RAG flows by mocking Pinecone, Qdrant, or ChromaDB endpoints
- Test image generation, audio transcription, or video processing workflows in isolation
Setup pitfalls
- Environment variables (like
OPENAI_BASE_URL) must be set before importing the provider SDK—many SDKs cache the base URL at construction time, risking real API calls if set after import - One secret was detected in the repository—review credential handling and
.gitignore - Reads and writes filesystem for record/replay fixtures—verify directory permissions in restricted CI environments
- High risk classification—ensure proper network isolation when running in multi-tenant or shared CI systems