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
{{ message }}
Repository navigation
Feature: raw SSE/JSON passthrough fixtures for LLM endpoints #549
For LLM endpoints every response is synthesized from a typed fixture, so testing a provider stream feature aimock doesn't model yet means waiting for a release. RawJSONResponse exists but is only served by the fal.ai handlers.
Proposal
An escape hatch for LLM endpoints: a fixture response that serves caller-supplied SSE events verbatim (and, for non-streaming requests, a verbatim JSON body), e.g.
Journal entries, matching, streaming profiles and chaos would apply exactly as for typed fixtures; only the body is passed through.
Use case
Lets downstream projects cover new provider features immediately (citations, file output, new event types) while first-class fixture fields are designed.
There's no first-class way to do this yet, but there is a workaround. llm.mount() runs before the built-in routes, so you can take over /v1/responses yourself:
llm.mount("/v1/responses",{asynchandleRequest(req,res){// decide from headers; return false before reading the body to fall through// ...write your own response here...returntrue;},});
If you return false before touching the body, the request goes to aimock as usual. The catch is that anything you handle this way loses fixture matching, the journal, chaos and timing.
What we want to build is a raw fixture type tied to a specific wire, like wire: "openai-responses". You give it your events verbatim (plus an optional json body for stream: false), aimock adds the framing, and matching, journal, chaos and timing all keep working. Responses, Chat Completions, Anthropic Messages and Gemini would come first. No date yet.
Leaving this open. Let's keep #550 moving separately.
Activity
jpr5 commentedon Oct 21, 2026
There's no first-class way to do this yet, but there is a workaround.
llm.mount()runs before the built-in routes, so you can take over/v1/responsesyourself:If you return false before touching the body, the request goes to aimock as usual. The catch is that anything you handle this way loses fixture matching, the journal, chaos and timing.
What we want to build is a
rawfixture type tied to a specific wire, likewire: "openai-responses". You give it your events verbatim (plus an optionaljsonbody forstream: false), aimock adds the framing, and matching, journal, chaos and timing all keep working. Responses, Chat Completions, Anthropic Messages and Gemini would come first. No date yet.Leaving this open. Let's keep #550 moving separately.