MockResponse
Defined in: backend-browser/src/mock.ts:89
Mock response configuration
Properties
Section titled “Properties”content
Section titled “content”content:
string|MessageContent[]
Defined in: backend-browser/src/mock.ts:93
Response content (text or content blocks)
delay?
Section titled “delay?”
optionaldelay:number
Defined in: backend-browser/src/mock.ts:113
Delay in milliseconds before responding
Default
Section titled “Default”0error?
Section titled “error?”
optionalerror:Error
Defined in: backend-browser/src/mock.ts:118
Error to throw instead of returning response
finishReason?
Section titled “finishReason?”
optionalfinishReason:"tool_use"|"stop"|"length"|"content_filter"
Defined in: backend-browser/src/mock.ts:99
Finish reason
Default
Section titled “Default”'stop'usage?
Section titled “usage?”
optionalusage:object
Defined in: backend-browser/src/mock.ts:104
Simulated token usage
inputTokens
Section titled “inputTokens”inputTokens:
number
outputTokens
Section titled “outputTokens”outputTokens:
number