The untested edge
The harness fakes the entire ModelGateway port, so the application loop is well tested but the provider-specific edge — reasoning-effort gating, status→error classification, SDK-event extraction, and the dispatch itself — had zero coverage. A regex typo or a dropped status mapping would pass the whole suite. This PR covers that edge and dedupes the classifier on the way.
The tests
classifyByStatus mappings; the reasoning gate (gpt-5*/o* yes, gpt-4.x/claude no); toContentStream concatenation, empty-delta skip, and the mid-stream re-throw; and a direct dispatcher test that proves routing by provider and that the provider field is dropped before reaching a ProviderAdapter.
classifyByStatus, the reasoning gate, and the OpenAI stream extraction + throw.
test/adapters.test.ts · 135 lines
⋯ 20 lines hidden (lines 1–20)
⋯ 65 lines hidden (lines 71–135)
The dispatcher routes by provider, drops the provider field, verify hits only the named adapter.