Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sour-parks-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/ai-openai": patch
---

Previously, setting `strict: false` on `OpenAiLanguageModel` config caused a 400 "Unknown parameter: 'strict'" response from the OpenAI Responses API, because the flag was spread into the top-level request body instead of being consumed only by the tool and response_format schema builders. The `strict` flag is now stripped from the request body while still controlling `strict` on tool schemas (`prepareTools`) and json_schema response formats (`prepareResponseFormat`).
3 changes: 2 additions & 1 deletion packages/ai/openai/src/OpenAiLanguageModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,9 @@ export const make = Effect.fnUntraced(function*(options: {
const include = prepareInclude(providerOptions, config)
const responseFormat = prepareResponseFormat(providerOptions)
const verbosity = config.text?.verbosity
const { strict: _strict, ...requestConfig } = config
const request: typeof Generated.CreateResponse.Encoded = {
...config,
...requestConfig,
input: messages,
include,
text: { format: responseFormat, verbosity },
Expand Down
Loading