From 61005e0bd9ad1a3c388d6e4c3ea30ea2a04e972e Mon Sep 17 00:00:00 2001 From: Sergio Esteban Date: Mon, 2 Feb 2026 19:02:08 +0100 Subject: [PATCH 1/2] fix: wrap evaluator request fields in data object The OpenAPI schema generator was missing the `data` wrapper that the actual API expects for evaluator endpoints. Before: `{"input": "...", "output": "...", "settings": {...}}` After: `{"data": {"input": "...", "output": "..."}, "settings": {...}}` Co-Authored-By: Claude Opus 4.5 --- scripts/generate-openapi-evals.ts | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/scripts/generate-openapi-evals.ts b/scripts/generate-openapi-evals.ts index 896de44..e1e255b 100644 --- a/scripts/generate-openapi-evals.ts +++ b/scripts/generate-openapi-evals.ts @@ -267,8 +267,27 @@ const generateRequestSchema = ( return { type: "object", - properties, - required: requiredFields, + properties: { + trace_id: { + type: "string", + description: "Optional trace ID to associate this evaluation with a trace", + }, + name: { + type: "string", + description: "Optional name for this evaluation", + }, + data: { + type: "object", + properties, + required: requiredFields, + }, + as_guardrail: { + type: "boolean", + description: "Whether to run this evaluation as a guardrail", + default: false, + }, + }, + required: ["data"], }; }; From 1195caad8888e71cacb1f138ae5cc66e2a25e1c7 Mon Sep 17 00:00:00 2001 From: Sergio Esteban Date: Tue, 3 Feb 2026 08:55:29 +0100 Subject: [PATCH 2/2] fix: clean payload Co-Authored-By: Claude Opus 4.5 --- scripts/generate-openapi-evals.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/scripts/generate-openapi-evals.ts b/scripts/generate-openapi-evals.ts index e1e255b..2a4c207 100644 --- a/scripts/generate-openapi-evals.ts +++ b/scripts/generate-openapi-evals.ts @@ -272,20 +272,11 @@ const generateRequestSchema = ( type: "string", description: "Optional trace ID to associate this evaluation with a trace", }, - name: { - type: "string", - description: "Optional name for this evaluation", - }, data: { type: "object", properties, required: requiredFields, }, - as_guardrail: { - type: "boolean", - description: "Whether to run this evaluation as a guardrail", - default: false, - }, }, required: ["data"], };