Construct a fresh driver instance wired to the scriptable vendor mock. Called in beforeEach, so every test gets a clean instance (and clean streaming state).
OptionalKnownDocumented deviations from the ideal contract — see LLMConformanceDeviation.
How the driver surfaces NON-cancellation vendor failures on the NON-streaming path. BaseLLM imposes no rule here (ChatCompletions, plural, is the normalizing layer):
OptionalPreWhat happens when a STREAMING request is made with an already-aborted token. Required when
SupportsStreaming is true.
[KNOWN DEVIATION] test name.Human-readable provider name, used in describe() labels.
Program the vendor mock: the next call fails with error at the given site. For
'midStream', the stream must first emit options.ChunkBeforeError (as a normal text chunk)
and then throw, so the suite can prove partial content is discarded.
Program the vendor mock: the next non-streaming call succeeds with this content + usage.
Program the vendor mock for a mid-stream cancellation: emit chunksBeforeAbort as normal
text chunks, then abort controller, then end the stream the way the real SDK ends an
aborted stream (throw its abort error, or end iteration silently — whichever is faithful).
Program the vendor mock: the next streaming call emits these text chunks (one vendor chunk
per entry, in order) and then completes, reporting usage in the vendor's native place for
stream usage (final chunk / usage event) even if the driver is known to drop it.
Whether the driver declares streaming support (asserted against SupportsStreaming).
Configuration for RunLLMConformanceSuite. The
Script*functions program the provider test file's vendor-SDK mock; the suite tells the adapter WHAT the vendor should do, the adapter translates that into the vendor's native wire shapes.