VidaiMock · open source, Apache 2.0
Every provider in CI. Zero cost.
Production-accurate streaming, errors and agent loops for every major provider, in CI. Deterministic, offline, no keys, no spend.
CI · test run
# start the mock, run the suite, no keys, no spend
$ docker run -d -p 8100:8100 ghcr.io/vidaiuk/vidaimock && pytest tests/agents/
agents/test_langgraph_loop.py .... [ tool loop terminates ]
agents/test_openai_stream.py .. [ SSE wire-accurate ]
agents/test_retry_on_429.py ... [ X-Mock-Status: 429 ]
23 passed in 1.84s · no keys · offline Or jump to install in 30 seconds.
What it is
Not a record-and-replay stub. A simulation engine.
Batteries included
OpenAI, Anthropic, Gemini, Bedrock, Azure, Cohere, Mistral and Groq respond correctly with zero configuration. Start the mock and point your SDK at it.
Agentic loops terminate
It detects a tool result already in the history and switches to plain-text synthesis, so ADK, LangGraph and LangChain runs end naturally instead of looping forever.
SDK-level wire accuracy
The official SDKs iterate it with no compatibility shims. Streams are regression-tested byte for byte against captured real-provider wire format.
Zero to a local provider in 30 seconds
Point any SDK at a fake that behaves real.
Docker Compose is the recommended path: one compose file, an overrides/ directory next to it, isolated mode via an environment variable. A plain docker run or the binary work the same way when you want a quicker throwaway. Either way it listens on port 8100.
# grab the compose file and start the mock; bundled providers serve immediately
$ curl -O https://raw.githubusercontent.com/vidaiUK/VidaiMock/main/docker/docker-compose.yml
$ docker compose up -d
# override a provider or template: drop it under ./overrides/, restart
$ mkdir -p overrides/providers && vim overrides/providers/openai.yaml
$ docker compose restart
# lock the surface to ONLY your overrides: flip one env var
$ echo "VIDAIMOCK_ISOLATED=true" >> .env && docker compose up -d # one-liner throwaway, no compose, no overrides
$ docker run --rm -p 8100:8100 ghcr.io/vidaiuk/vidaimock:latest
# or the binary, no Docker needed (macOS arm64 shown; Linux + Windows in the docs)
$ curl -LO https://github.com/vidaiUK/VidaiMock/releases/latest/download/vidaimock-macos-arm64.tar.gz
$ tar -xzf vidaimock-macos-arm64.tar.gz && cd vidaimock && ./vidaimock
# whichever path you took: force any status on a real provider route
$ curl -H "X-Mock-Status: 429" localhost:8100/v1/chat/completions \
-d '{"model":"gpt-4","messages":[{"role":"user","content":"Hi"}]}'
← 429 {"error":{"type":"rate_limit_error", …}} Signed multi-arch Docker image (~25 MB distroless) or a ~7 MB binary, no dependencies. YAML providers and Tera templates, overridable without recompiling. /health, /status and Prometheus /metrics built in.
The part most mocks skip
Agent loops that terminate, just like the real provider.
Tools defined, no result yet
It emits a tool_call, tool_use or functionCall in the calling provider's native shape.
Tool result already in history
It switches to plain-text synthesis with the correct terminal signal, so the loop ends.
All three providers
OpenAI role:tool, Anthropic tool_result blocks and Gemini functionResponse parts are all recognised.
Real CI value
Run Google ADK, LangGraph or LangChain Runner loops end to end with zero live-provider spend.
Why teams adopt it
Deterministic CI, production-accurate behaviour.
Provider-shaped errors
Inject a 400, 429 or 500 by header, URL query or chaos probability. Every one returns the real OpenAI, Anthropic or Gemini error envelope, so SDK error paths are tested honestly.
Typed SSE streaming
OpenAI Responses typed events, Anthropic's 7-event lifecycle, Gemini's terminal-chunk pattern, and final usage chunks, all wire-accurate.
Customisable without a rebuild
Bundled providers and Tera templates are embedded defaults; drop a file in your config directory and disk beats embedded.
The development environment for Vidai
The same simulation engine that powers the mock drives the Control room's latency and failure modelling.
Operations and security →VidaiMock on GitHub → Install, agentic testing, chaos and streaming in the docs → Back to Developers →
How we start together
Start with one team, on your own AI traffic.
- 01
Pick one app or team
Point it at the Control room. One configuration change; nothing else changes.
- 02
Watch for two weeks
Every call priced, checked and recorded. Rules start in observe mode.
- 03
See the evidence
What it cost, what it caught and what it would have stopped, from your own traffic.