最后更新:2026 年 8 月 24 日
常见问题
如何安装 MockLLM?
通过 Homebrew 安装最快捷:brew install mockllm,随后执行 mockllm init 与 mockllm serve 即可启动本地服务。也可使用 npm i -g mockllm。macOS 桌面版可直接从 App Store 下载安装。
请求匹配是如何工作的?
每条规则包含一组匹配条件(关键词、模型名、请求体字段等)与对应的响应模板。当请求到达时,MockLLM 会按规则顺序匹配,命中后返回你定义的响应。你可以设置多条匹配条件,满足任一即触发(OR 逻辑)。
如何激活 Pro 版?
在桌面版中进入「项目设置 → 升级」,可通过 App Store(macOS)内购,或使用离线激活码。免费版最多可创建 10 条规则;激活 Pro 后解除数量限制,并解锁语义/模糊匹配、多轮流程(flow)与高级故障类型。
支持哪些故障注入类型?
免费版支持 error(错误)、rate_limit(429)、service_unavailable(503)、timeout(超时)。Pro 版额外支持 bad_json、content_filter、length、delay、field_drift、stream_interrupt 等。
MockLLM 是否完全离线可用?
是的。MockLLM 在本地运行,所有规则、日志与录制数据都保存在你的机器上,不会向外部发送任何请求或遥测数据。无需注册,无需 API Key。
我的数据存在哪里?
所有配置与录制数据都保存在本地项目目录中(桌面版位于应用沙盒内)。我们不会上传、收集或分析你的数据。详见隐私政策。
没找到答案?
发送邮件至 support@mock-llm.com,或在 GitHub Issues 提交问题。我们会尽快回复。
Last updated: August 24, 2026
Frequently Asked Questions
How do I install MockLLM?
The quickest way is Homebrew: brew install mockllm, then run mockllm init and mockllm serve to start the local server. You can also use npm i -g mockllm. The macOS desktop app is available on the App Store.
How does request matching work?
Each rule holds a set of match conditions (keywords, model name, request-body fields, etc.) and a response template. When a request arrives, MockLLM evaluates rules in order and returns your defined response on the first hit. You can add multiple conditions — any one matching triggers the rule (OR logic).
How do I activate Pro?
In the desktop app, open "Project Settings → Upgrade". You can upgrade via the App Store (macOS) or use an offline activation code. The free edition allows up to 10 rules; Pro removes the limit and unlocks semantic/fuzzy matching, multi-turn flows, and advanced fault types.
Which fault types are supported?
The free edition supports error, rate_limit (429), service_unavailable (503) and timeout. Pro adds bad_json, content_filter, length, delay, field_drift and stream_interrupt.
Does MockLLM work fully offline?
Yes. MockLLM runs locally; all rules, logs and recordings stay on your machine. It sends no outbound requests and collects zero telemetry. No registration or API key required.
Where is my data stored?
All configuration and recordings are stored in your local project directory (the desktop app uses its sandbox). We never upload, collect or analyze your data. See our Privacy Policy.
Still need help?
Email support@mock-llm.com or open an issue on GitHub Issues. We usually reply within a couple of business days.