From 659ff1e84532849a06223657e63407a4e83bf818 Mon Sep 17 00:00:00 2001 From: Bryan Frimin Date: Fri, 13 Mar 2026 19:02:12 +0100 Subject: [PATCH] Honor JSONSchema.Strict in OpenAI response format buildResponseFormat was hardcoding strict: true instead of reading rf.JSONSchema.Strict, making it impossible to request non-strict JSON-schema output. Signed-off-by: Bryan Frimin --- pkg/llm/openai/provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/llm/openai/provider.go b/pkg/llm/openai/provider.go index e8bfbe12c..5e33f480c 100644 --- a/pkg/llm/openai/provider.go +++ b/pkg/llm/openai/provider.go @@ -261,7 +261,7 @@ func buildResponseFormat(rf *llm.ResponseFormat) openai.ChatCompletionNewParamsR if rf.JSONSchema != nil { schema := shared.ResponseFormatJSONSchemaJSONSchemaParam{ Name: rf.JSONSchema.Name, - Strict: param.NewOpt(true), + Strict: param.NewOpt(rf.JSONSchema.Strict), } if rf.JSONSchema.Description != "" { schema.Description = param.NewOpt(rf.JSONSchema.Description)