schema-stream
Integrations

Integrations

Schema Stream consumes an async sequence of JSON text or UTF-8 bytes. Provider SDKs remain responsible for generation, structured-output validation, retries, cancellation, and the authoritative final result.

Schema Stream consumes an async sequence of JSON text or UTF-8 bytes. Provider SDKs remain responsible for generation, structured-output validation, retries, cancellation, and the authoritative final result.

Choose the guide for the stream surface you already use:

  • OpenAI Agents SDK uses result.toTextStream().
  • Vercel AI SDK uses streamText().textStream with Output.object().
  • Mastra explains when to prefer objectStream and how the guarded compatibility path works.
  • Bun WebSocket keeps parsing and credentials on the server and sends complete application messages to the browser.
  • Provider portability defines the tested boundary for OpenAI, Anthropic, and Gemini models without claiming untested native adapters.

The executable fixtures are the source of truth. From a repository checkout, run:

bun run examples
bun test tests/sdk-runtime.test.ts
bun run test:packed

Those commands are credential-free. Opt-in live tests and their environment contract are described in Integration testing. Schema Stream does not validate intermediate snapshots; validate or await the producing SDK's final structured result before committing data or triggering irreversible work.