Skip to Content
LoremLLM

Config file

Every option in loremllm.config.ts.

loremllm.config.ts
import { defineConfig, defineMock } from "loremllm";

export default defineConfig({
  project: "acme",
  mocks: [defineMock("support-bot", {/* options */})],
});

defineConfig

OptionTypeDescription
projectstringProject slug to push to and pull from
mocksMock[]Mock definitions
mocksDirstringFolder for pulled mocks. Default loremllm/mocks
recordingsDirstringFolder for recordings. Default loremllm/recordings
server{ port, latency }Defaults for loremllm dev

defineMock(slug, options)

OptionTypeDescription
modelstringModel name reported in responses. Default "loremllm-1"
visibility"public" | "private"Default "private"
streamStreamSettings{ chunking, chunkDelayMs, initialDelayMs }. See Streaming
scenariosScenario[]See Scenarios
mcpMcpDefinitionSee MCP
seedstringSeed for anything random
pricing{ inputPerMillion, outputPerMillion }Rates for cost estimates
descriptionstringShown in the dashboard

Scenario

FieldTypeDescription
namestringShown in the inspector and assertions
whenWhenSee Matching. Omit to match everything
replyReply | Reply[] | (ctx) => ReplySee Replies
streamStreamSettingsOverrides the mock's stream settings
modelstringOverrides 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.

On this page