Tailrace
Reference

HTTP

Reference for @tailrace/http - shared OpenAI-compat body, SSE, and 422 helpers.

@tailrace/http provides the shared OpenAI-compatible pipeline used by Hono, Express, Fastify, NestJS, and Encore adapters. No host peers.

Install

pnpm add @tailrace/core @tailrace/http

Key exports

ExportDescription
runOpenAiCompatRequestCheckCheck/rewrite chat request body
runOpenAiCompatJsonResponseCheckCheck/rewrite completion JSON
createOpenAiCompatSseTransformSSE carry-buffer transform
policyViolationBody / POLICY_VIOLATION_STATUS422 body builder

Prefer a host package unless you are building a custom adapter: Hono · Express · Fastify · NestJS · Encore.

Spec: repo docs/integrations.md §9.

On this page