[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"readme:aimock":3},"\u003Cdiv align=\"center\">\u003Ch1>aimock\u003C\u002Fh1>\n\u003Cp>\u003Cstrong>Mock infrastructure for AI application testing — point your SDK at one local port and every provider, protocol, and service answers deterministically.\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cp>\u003Ca href=\"#quick-start\" rel=\"nofollow ugc noopener\">\u003Cstrong>Quick start\u003C\u002Fstrong>\u003C\u002Fa> · \u003Ca href=\"#the-aimock-suite\" rel=\"nofollow ugc noopener\">\u003Cstrong>The suite\u003C\u002Fstrong>\u003C\u002Fa> · \u003Ca href=\"https:\u002F\u002Faimock.copilotkit.dev\u002Frecord-replay\" rel=\"nofollow ugc noopener\">\u003Cstrong>Record &amp; replay\u003C\u002Fstrong>\u003C\u002Fa> · \u003Ca href=\"https:\u002F\u002Faimock.copilotkit.dev\u002Fdocs\" rel=\"nofollow ugc noopener\">\u003Cstrong>Docs\u003C\u002Fstrong>\u003C\u002Fa>\u003C\u002Fp>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@copilotkit\u002Faimock\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@copilotkit\u002Faimock.svg?label=%40copilotkit%2Faimock\" alt=\"npm\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FCopilotKit\u002Faimock\u002Factions\u002Fworkflows\u002Ftest-unit.yml\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002FCopilotKit\u002Faimock\u002Factions\u002Fworkflows\u002Ftest-unit.yml\u002Fbadge.svg\" alt=\"Unit Tests\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FCopilotKit\u002Faimock\u002Factions\u002Fworkflows\u002Ftest-drift.yml\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002FCopilotKit\u002Faimock\u002Factions\u002Fworkflows\u002Ftest-drift.yml\u002Fbadge.svg\" alt=\"Drift Tests\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FCopilotKit\u002Faimock\u002Fblob\u002FHEAD\u002FLICENSE\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg\" alt=\"License: MIT\" \u002F>\u003C\u002Fa>\u003C\u002Fp>\n\u003C\u002Fdiv>\u003Cp>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F76815122-574a-48e1-b275-edae0a014667\" rel=\"nofollow ugc noopener\">https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F76815122-574a-48e1-b275-edae0a014667\u003C\u002Fa>\u003C\u002Fp>\n\u003Cdiv align=\"center\">\u003Cp>One package, one port, zero dependencies. LLM APIs, image generation and\nediting, text-to-speech, transcription, audio translation and generation, video\ngeneration, embeddings, MCP tools, A2A agents, AG-UI event streams, vector\ndatabases, search, rerank, and moderation — no keys, no network, no surprise\nbills.\u003C\u002Fp>\n\u003C\u002Fdiv>\u003Ch2>Quick Start\u003C\u002Fh2>\n\u003Cpre>\u003Ccode class=\"language-bash\">npm install @copilotkit\u002Faimock\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cpre>\u003Ccode class=\"language-typescript\">\u002F\u002F The class is still named `LLMock` for back-compat after the v1.7.0 package\n\u002F\u002F rename from `@copilotkit\u002Fllmock` to `@copilotkit\u002Faimock`.\nimport { LLMock } from \"@copilotkit\u002Faimock\";\n\nconst mock = new LLMock({ port: 0 });\nmock.onMessage(\"hello\", { content: \"Hi there!\" });\nawait mock.start();\n\n\u002F\u002F Set env BEFORE importing\u002Fconstructing the OpenAI (or other provider) client.\n\u002F\u002F Many SDKs cache the base URL at construction time — if the client is built\n\u002F\u002F before these are set, it will talk to the real API (surprise bills) instead\n\u002F\u002F of aimock.\nprocess.env.OPENAI_BASE_URL = `${mock.url}\u002Fv1`;\nprocess.env.OPENAI_API_KEY = \"mock\"; \u002F\u002F SDK requires a value, even when base URL is mocked\n\n\u002F\u002F ... run your tests ...\n\nawait mock.stop();\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>The aimock Suite\u003C\u002Fh2>\n\u003Cp>aimock mocks everything your AI app talks to:\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Tool\u003C\u002Fth>\n\u003Cth>What it mocks\u003C\u002Fth>\n\u003Cth>Docs\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>\u003Cstrong>LLMock\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>OpenAI (Chat\u002FResponses\u002FRealtime GA+Beta), Claude, Gemini (REST\u002FLive\u002FInteractions\u002FEmbeddings), Bedrock, Azure, Vertex AI, Ollama (chat\u002Fembeddings), Cohere (chat\u002Fembed), OpenRouter (chat\u002Frouter), ElevenLabs TTS\u003C\u002Ftd>\n\u003Ctd>\u003Ca href=\"https:\u002F\u002Faimock.copilotkit.dev\u002Fdocs\" rel=\"nofollow ugc noopener\">Providers\u003C\u002Fa>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>MCPMock\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>MCP tools, resources, prompts with session management\u003C\u002Ftd>\n\u003Ctd>\u003Ca href=\"https:\u002F\u002Faimock.copilotkit.dev\u002Fmcp-mock\" rel=\"nofollow ugc noopener\">MCP\u003C\u002Fa>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>A2AMock\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>Agent-to-agent protocol with SSE streaming\u003C\u002Ftd>\n\u003Ctd>\u003Ca href=\"https:\u002F\u002Faimock.copilotkit.dev\u002Fa2a-mock\" rel=\"nofollow ugc noopener\">A2A\u003C\u002Fa>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>AGUIMock\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>AG-UI agent-to-UI event streams for frontend testing\u003C\u002Ftd>\n\u003Ctd>\u003Ca href=\"https:\u002F\u002Faimock.copilotkit.dev\u002Fagui-mock\" rel=\"nofollow ugc noopener\">AG-UI\u003C\u002Fa>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>VectorMock\u003C\u002Fstrong>\u003C\u002Ftd>\n\u003Ctd>Pinecone, Qdrant, ChromaDB compat\u003C\u002Ftd>\n\u003Ctd>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\n",1787445486845]