Config file
Every option in loremllm.config.ts.
import { defineConfig, defineMock } from "loremllm";
export default defineConfig({
project: "acme",
mocks: [defineMock("support-bot", {/* options */})],
});defineConfig
| Option | Type | Description |
|---|---|---|
project | string | Project slug to push to and pull from |
mocks | Mock[] | Mock definitions |
mocksDir | string | Folder for pulled mocks. Default loremllm/mocks |
recordingsDir | string | Folder for recordings. Default loremllm/recordings |
server | { port, latency } | Defaults for loremllm dev |
defineMock(slug, options)
| Option | Type | Description |
|---|---|---|
model | string | Model name reported in responses. Default "loremllm-1" |
visibility | "public" | "private" | Default "private" |
stream | StreamSettings | { chunking, chunkDelayMs, initialDelayMs }. See Streaming |
scenarios | Scenario[] | See Scenarios |
mcp | McpDefinition | See MCP |
seed | string | Seed for anything random |
pricing | { inputPerMillion, outputPerMillion } | Rates for cost estimates |
description | string | Shown in the dashboard |
Scenario
| Field | Type | Description |
|---|---|---|
name | string | Shown in the inspector and assertions |
when | When | See Matching. Omit to match everything |
reply | Reply | Reply[] | (ctx) => Reply | See Replies |
stream | StreamSettings | Overrides the mock's stream settings |
model | string | Overrides the reported model |
JSON mocks
Pulled mocks are plain JSON with the same shape. RegExps are written as { "regex": "refund", "flags": "i" } and builders as { "type": "tool-call", "toolName": "lookupOrder", "input": { "id": "A-1042" } }, the same part names the AI SDK uses. Function replies become templates.