You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following up on the Discord conversation with Alem about enabling easier testing.
When writing e2e tests, I want deterministic responses so I can make reliable assertions. Real LLM calls make tests flaky, slow, and expensive.
I've rolled my own mock layer using query params, but it's a lot of boilerplate to match the chunk format. Would be great to have something like this supported out of the box.
Ideally it would let you say "for this request, return exactly this response" with controllable streaming behavior. For example, I control how long a stream takes to complete so I can test stream resumption with Playwright. I have a bunch of test fixtures on my server and have them removed in prod builds with dead code removal controlled by a build time constant.
Bonus idea: it would be cool to generate fixtures by recording real LLM conversations through devtools.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Following up on the Discord conversation with Alem about enabling easier testing.
When writing e2e tests, I want deterministic responses so I can make reliable assertions. Real LLM calls make tests flaky, slow, and expensive.
I've rolled my own mock layer using query params, but it's a lot of boilerplate to match the chunk format. Would be great to have something like this supported out of the box.
Ideally it would let you say "for this request, return exactly this response" with controllable streaming behavior. For example, I control how long a stream takes to complete so I can test stream resumption with Playwright. I have a bunch of test fixtures on my server and have them removed in prod builds with dead code removal controlled by a build time constant.
Bonus idea: it would be cool to generate fixtures by recording real LLM conversations through devtools.
Beta Was this translation helpful? Give feedback.
All reactions