Skip to content

MockBackendConfig

Defined in: backend-browser/src/mock.ts:124

Mock backend configuration

optional defaultModel: string

Defined in: backend-browser/src/mock.ts:157

Default model name

'mock-model'

optional defaultResponse: string | MockResponse

Defined in: backend-browser/src/mock.ts:129

Default response to return

"This is a mock response."

optional modelResponses: Record<string, string | MockResponse>

Defined in: backend-browser/src/mock.ts:134

Map of model names to specific responses


optional models: readonly (string | AIModel)[]

Defined in: backend-browser/src/mock.ts:169

Static list of models to return (optional) Can be model IDs (strings) or full AIModel objects


optional responseGenerator: (request) => string | MockResponse

Defined in: backend-browser/src/mock.ts:139

Custom response function

IRChatRequest

string | MockResponse


optional simulateStreaming: boolean

Defined in: backend-browser/src/mock.ts:145

Simulate streaming chunks

false

optional simulateUsage: boolean

Defined in: backend-browser/src/mock.ts:163

Simulate token usage

true

optional streamChunkDelay: number

Defined in: backend-browser/src/mock.ts:151

Delay between stream chunks in milliseconds

50