Skip to content

docs: add OpenAI provider options documentation to scheduleSchema#815

Merged
threepointone merged 1 commit into
mainfrom
fix-scheduling
Jan 30, 2026
Merged

docs: add OpenAI provider options documentation to scheduleSchema#815
threepointone merged 1 commit into
mainfrom
fix-scheduling

Conversation

@threepointone

Copy link
Copy Markdown
Contributor

When using scheduleSchema with OpenAI models via the AI SDK, users must now pass providerOptions: { openai: { strictJsonSchema: false } } to generateObject. This is documented in the JSDoc for scheduleSchema.

This is required because @ai-sdk/openai now defaults strictJsonSchema to true, which requires all schema properties to be in the required array. The scheduleSchema uses optional fields which are not compatible with this strict mode.

When using `scheduleSchema` with OpenAI models via the AI SDK, users must now pass `providerOptions: { openai: { strictJsonSchema: false } }` to `generateObject`. This is documented in the JSDoc for `scheduleSchema`.

This is required because `@ai-sdk/openai` now defaults `strictJsonSchema` to `true`, which requires all schema properties to be in the `required` array. The `scheduleSchema` uses optional fields which are not compatible with this strict mode.
@changeset-bot

changeset-bot Bot commented Jan 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2673ade

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
agents Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@claude

claude Bot commented Jan 30, 2026

Copy link
Copy Markdown

Claude Code Review

Issue: Missing providerOptions in eval file

The eval file at packages/agents/evals/scheduling.eval.ts:330-340 uses scheduleSchema with OpenAI but does not include the required providerOptions: { openai: { strictJsonSchema: false } }. This will cause the eval to fail with strict JSON schema validation errors.

The PR correctly updates the playground example but misses the eval file that also uses scheduleSchema with OpenAI.

@pkg-pr-new

pkg-pr-new Bot commented Jan 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/cloudflare/agents@815

commit: 2673ade

@threepointone
threepointone merged commit ded8d3e into main Jan 30, 2026
6 checks passed
@threepointone
threepointone deleted the fix-scheduling branch January 30, 2026 11:24
@github-actions github-actions Bot mentioned this pull request Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants