Confirm this is a feature request for the Node library and not the underlying OpenAI API.
Describe the feature or improvement you're requesting
Summary
Add first-class Standard Schema support to the structured-output and tool helpers, so any conforming validation library — Zod, Valibot,
ArkType — works through a single integration, instead of a separate xResponseFormat / xFunction per library.
Why Standard Schema
One interface covers both jobs the helpers need:
| Capability |
Spec member |
Notes |
| Parse model output |
~standard.validate(value) |
Universal across conforming libraries; replaces the per-library parse callback. |
| Generate JSON Schema |
~standard.jsonSchema |
The emerging Standard JSON Schema spec; used when a library exposes it. |
Proposed shape
New helpers in src/helpers/standard-schema.ts, leaving the existing Zod helpers untouched:
standardResponseFormat
standardTextFormat
standardFunction
standardResponsesFunction
JSON Schema resolution — hybrid, in priority order:
- Caller-supplied
schema, else
~standard.jsonSchema if the library exposes it, else
- a clear, actionable error.
The result is always passed through the existing toStrictJsonSchema transform, so output stays Structured-Outputs-compatible.
Key properties:
- ✅ No new per-library dependencies —
@standard-schema/spec is types-only.
- ✅ Validation routes through
~standard.validate.
- ✅ Full type inference via
StandardSchemaV1.InferOutput.
Additional context
Follows the discussion in #1021
In that thread:
- @RobertCraigie noted the SDK shouldn't vendor a JSON-Schema converter per library.
- @fabian-hiller proposed Standard Schema to "reduce implementation effort and prevent vendor lock-in," later adding "it would be great if OpenAI could integrate it in the SDK."
A single Standard Schema integration addresses the converter-bloat concern directly.
I'm happy to put together a PR with the implementation and tests (Valibot + ArkType end-to-end, plus a Zod parity test). Opening this issue first to confirm direction and scope before writing the code.
Confirm this is a feature request for the Node library and not the underlying OpenAI API.
Describe the feature or improvement you're requesting
Summary
Add first-class Standard Schema support to the structured-output and tool helpers, so any conforming validation library — Zod, Valibot,
ArkType — works through a single integration, instead of a separate
xResponseFormat/xFunctionper library.Why Standard Schema
One interface covers both jobs the helpers need:
~standard.validate(value)~standard.jsonSchemaProposed shape
New helpers in
src/helpers/standard-schema.ts, leaving the existing Zod helpers untouched:standardResponseFormatstandardTextFormatstandardFunctionstandardResponsesFunctionJSON Schema resolution — hybrid, in priority order:
schema, else~standard.jsonSchemaif the library exposes it, elseThe result is always passed through the existing
toStrictJsonSchematransform, so output stays Structured-Outputs-compatible.Key properties:
@standard-schema/specis types-only.~standard.validate.StandardSchemaV1.InferOutput.Additional context
Follows the discussion in #1021
In that thread:
A single Standard Schema integration addresses the converter-bloat concern directly.
I'm happy to put together a PR with the implementation and tests (Valibot + ArkType end-to-end, plus a Zod parity test). Opening this issue first to confirm direction and scope before writing the code.