From 8cd882c4bd0221d0ba42a20faa7434863f1785bf Mon Sep 17 00:00:00 2001 From: pakrym-oai Date: Sun, 5 Oct 2025 18:21:29 -0700 Subject: [PATCH] Update README.md (#4794) # External (non-OpenAI) Pull Request Requirements Before opening this Pull Request, please read the dedicated "Contributing" markdown file or your PR may be closed: https://github.com/openai/codex/blob/main/docs/contributing.md If your PR conforms to our contribution guidelines, replace this text with a detailed and high quality description of your changes. --- sdk/typescript/README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sdk/typescript/README.md b/sdk/typescript/README.md index 16b179ef..1aeffce6 100644 --- a/sdk/typescript/README.md +++ b/sdk/typescript/README.md @@ -52,9 +52,7 @@ for await (const event of events) { ### Structured output -Provide a JSON schema per turn to have Codex respond with structured JSON. Pass schemas as -plain JavaScript objects. - +The Codex agent can produce a JSON response that conforms to a specified schema. The schema can be provided for each turn as a plain JSON object. ```typescript const schema = { @@ -71,7 +69,7 @@ const turn = await thread.run("Summarize repository status", { outputSchema: sch console.log(turn.finalResponse); ``` -You can also create JSON schemas for Zod types using the `zod-to-json-schema` package and setting the `target` to `"openAi"`. +You can also create a JSON schema from a [Zod schema](https://github.com/colinhacks/zod) using the [`zod-to-json-schema`](https://www.npmjs.com/package/zod-to-json-schema) package and setting the `target` to `"openAi"`. ```typescript const schema = z.object({