@wix/evalforge-types 0.87.0 → 0.88.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.mjs CHANGED
@@ -143,7 +143,13 @@ function normalizeModelId(modelId) {
143
143
  var nullToUndefined = (val) => val === null ? void 0 : val;
144
144
  var ModelConfigSchema = z4.object({
145
145
  model: AnyModelSchema,
146
- temperature: z4.preprocess(nullToUndefined, z4.number().min(0).max(1).optional()).optional(),
146
+ // In Zod v4, z.preprocess() creates ZodEffects which is not recognized as optional
147
+ // by the object schema. Outer .optional() ensures missing keys are accepted; inner
148
+ // .optional() handles null→undefined conversion from the preprocessor.
149
+ temperature: z4.preprocess(
150
+ nullToUndefined,
151
+ z4.number().min(0).max(1).optional()
152
+ ).optional(),
147
153
  maxTokens: z4.preprocess(nullToUndefined, z4.number().min(1).optional()).optional(),
148
154
  /** Number of agentic turns. 0 = unlimited (agent runs until done or timeout). */
149
155
  maxTurns: z4.preprocess(nullToUndefined, z4.number().int().min(0).optional()).optional()