MockBackendConfig
Defined in: backend-browser/src/mock.ts:124
Mock backend configuration
Properties
Section titled “Properties”defaultModel?
Section titled “defaultModel?”
optionaldefaultModel:string
Defined in: backend-browser/src/mock.ts:157
Default model name
Default
Section titled “Default”'mock-model'defaultResponse?
Section titled “defaultResponse?”
optionaldefaultResponse:string|MockResponse
Defined in: backend-browser/src/mock.ts:129
Default response to return
Default
Section titled “Default”"This is a mock response."modelResponses?
Section titled “modelResponses?”
optionalmodelResponses:Record<string,string|MockResponse>
Defined in: backend-browser/src/mock.ts:134
Map of model names to specific responses
models?
Section titled “models?”
optionalmodels: 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
responseGenerator()?
Section titled “responseGenerator()?”
optionalresponseGenerator: (request) =>string|MockResponse
Defined in: backend-browser/src/mock.ts:139
Custom response function
Parameters
Section titled “Parameters”request
Section titled “request”Returns
Section titled “Returns”string | MockResponse
simulateStreaming?
Section titled “simulateStreaming?”
optionalsimulateStreaming:boolean
Defined in: backend-browser/src/mock.ts:145
Simulate streaming chunks
Default
Section titled “Default”falsesimulateUsage?
Section titled “simulateUsage?”
optionalsimulateUsage:boolean
Defined in: backend-browser/src/mock.ts:163
Simulate token usage
Default
Section titled “Default”truestreamChunkDelay?
Section titled “streamChunkDelay?”
optionalstreamChunkDelay:number
Defined in: backend-browser/src/mock.ts:151
Delay between stream chunks in milliseconds
Default
Section titled “Default”50