Mock LLM service with scripting controls.
Expire every handle and cancel active work (account/connection change).
Queue the text the next generation streams (with finish, default stop).
finish
stop
Optional
const llm = createMockLlmService();llm.respondWith('Scripted answer'); Copy
const llm = createMockLlmService();llm.respondWith('Scripted answer');
Mock LLM service with scripting controls.