Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(deps): bump zod to 4.6.6 (#18932)

Nimar9e3ff3a0248c
diff --git a/ee/package.json b/ee/package.json
index 8ca4cb3571..b5866da806 100644
--- a/ee/package.json
+++ b/ee/package.json
@@ -26,7 +26,7 @@
},
"dependencies": {
"@langfuse/shared": "workspace:*",
- "zod": "^4.3.6"
+ "zod": "^4.6.6"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
diff --git a/packages/in-app-agent-sandbox-runtime/package.json b/packages/in-app-agent-sandbox-runtime/package.json
index cdada73efa..f67d7c7b64 100644
--- a/packages/in-app-agent-sandbox-runtime/package.json
+++ b/packages/in-app-agent-sandbox-runtime/package.json
@@ -18,7 +18,7 @@
"format:check": "prettier --check ."
},
"dependencies": {
- "zod": "^4.3.6"
+ "zod": "^4.6.6"
},
"devDependencies": {
"@repo/typescript-config": "workspace:*",
diff --git a/packages/shared/package.json b/packages/shared/package.json
index d77eb16bdd..35036d07c0 100644
--- a/packages/shared/package.json
+++ b/packages/shared/package.json
@@ -275,7 +275,7 @@
"undici": "^7.30.1",
"uuid": "^14.0.2",
"winston": "^3.15.0",
- "zod": "^4.3.6"
+ "zod": "^4.6.6"
},
"devDependencies": {
"@opentelemetry/context-async-hooks": "^2.9.0",
diff --git a/packages/shared/src/domain/scores.ts b/packages/shared/src/domain/scores.ts
index ef395ab9a2..811ba19aff 100644
--- a/packages/shared/src/domain/scores.ts
+++ b/packages/shared/src/domain/scores.ts
@@ -61,7 +61,7 @@ export const ScoreDataTypeDomain = z.enum(ScoreDataTypeArray);
export type ScoreDataTypeType = z.infer<typeof ScoreDataTypeDomain>;
export const NumericData = z.object({
- stringValue: z.union([z.null(), z.undefined()]),
+ stringValue: z.null().optional(),
dataType: z.literal("NUMERIC"),
});
diff --git a/packages/shared/src/features/prompts/types.ts b/packages/shared/src/features/prompts/types.ts
index 3321ba6e64..324935f909 100644
--- a/packages/shared/src/features/prompts/types.ts
+++ b/packages/shared/src/features/prompts/types.ts
@@ -1,6 +1,6 @@
import { z } from "zod";
import type { Prompt } from "@prisma/client";
-import { jsonSchema, optionalJsonParam } from "../../utils/zod";
+import { isoDateTime, jsonSchema, optionalJsonParam } from "../../utils/zod";
import {
arrayOptionsFilter,
coerceLegacyEmptyMetadataFilters,
@@ -111,8 +111,8 @@ export const GetPromptsMetaSchema = z.object({
tag: z.string().optional(),
page: z.coerce.number().int().min(1).default(1),
limit: z.coerce.number().int().min(1).max(100).default(10),
- fromUpdatedAt: z.iso.datetime({ offset: true }).nullish(),
- toUpdatedAt: z.iso.datetime({ offset: true }).nullish(),
+ fromUpdatedAt: isoDateTime({ offset: true }).nullish(),
+ toUpdatedAt: isoDateTime({ offset: true }).nullish(),
filter: optionalJsonParam(promptFilterSchema, "filter"),
});
diff --git a/packages/shared/src/features/query/types.ts b/packages/shared/src/features/query/types.ts
index 68f15799ef..85316b2098 100644
--- a/packages/shared/src/features/query/types.ts
+++ b/packages/shared/src/features/query/types.ts
@@ -1,3 +1,4 @@
+import { isoDateTime } from "../../utils/zod";
import { z } from "zod";
import { singleFilterList } from "../../interfaces/filters";
@@ -118,7 +119,7 @@ export const viewDeclaration = z.object({
.optional(),
});
-const stringDateTime = z.iso.datetime({ offset: true });
+const stringDateTime = isoDateTime({ offset: true });
export const views = z.enum([
"traces",
diff --git a/packages/shared/src/features/scores/interfaces/api/shared.ts b/packages/shared/src/features/scores/interfaces/api/shared.ts
index 5bfcf13f4a..689640e280 100644
--- a/packages/shared/src/features/scores/interfaces/api/shared.ts
+++ b/packages/shared/src/features/scores/interfaces/api/shared.ts
@@ -111,7 +111,7 @@ export const PostScoreBody = applyScoreValidation(
}),
z.object({
value: z.union([z.string(), z.number()]),
- dataType: z.undefined(),
+ dataType: z.undefined().optional(),
configId: z.string().nullish(),
}),
]),
diff --git a/packages/shared/src/features/skills/types.ts b/packages/shared/src/features/skills/types.ts
index 710c37b4d1..e17ac1efb2 100644
--- a/packages/shared/src/features/skills/types.ts
+++ b/packages/shared/src/features/skills/types.ts
@@ -1,5 +1,5 @@
import { z } from "zod/v4";
-import { jsonSchema } from "../../utils/zod";
+import { isoDateTime, jsonSchema } from "../../utils/zod";
import { PromptLabelSchema } from "../prompts/types";
import { COMMIT_MESSAGE_MAX_LENGTH } from "../prompts/constants";
import {
@@ -223,8 +223,8 @@ export const ListSkillsQuerySchema = z.object({
tag: z.string().optional(),
page: z.coerce.number().int().min(1).default(1),
limit: z.coerce.number().int().min(1).max(100).default(10),
- fromUpdatedAt: z.iso.datetime({ offset: true }).optional(),
- toUpdatedAt: z.iso.datetime({ offset: true }).optional(),
+ fromUpdatedAt: isoDateTime({ offset: true }).optional(),
+ toUpdatedAt: isoDateTime({ offset: true }).optional(),
});
export const UpdateSkillLabelsBodySchema = z.object({
diff --git a/packages/shared/src/server/ingestion/types.ts b/packages/shared/src/server/ingestion/types.ts
index f14486b739..72e0cb3aab 100644
--- a/packages/shared/src/server/ingestion/types.ts
+++ b/packages/shared/src/server/ingestion/types.ts
@@ -1,7 +1,7 @@
import isEmpty from "lodash/isEmpty";
import { z } from "zod";
-import { NonEmptyString, jsonSchema } from "../../utils/zod";
+import { isoDateTime, NonEmptyString, jsonSchema } from "../../utils/zod";
import { ModelUsageUnit } from "../../constants";
import { ScoreSourceType } from "../../domain";
import { TEXT_SCORE_MAX_LENGTH } from "../../domain/scores";
@@ -40,7 +40,7 @@ const MixedUsage = z.object({
totalCost: z.number().nullish(),
});
-export const stringDateTime = z.iso.datetime({ offset: true }).nullish();
+export const stringDateTime = isoDateTime({ offset: true }).nullish();
export const usage = MixedUsage.nullish()
// transform mixed usage model input to new one
@@ -641,7 +641,7 @@ const createAllIngestionSchemas = ({
BaseScoreBody.extend(
z.object({
value: z.union([z.string(), z.number()]),
- dataType: z.undefined(),
+ dataType: z.undefined().optional(),
configId: z.string().nullish(),
}).shape,
),
@@ -669,7 +669,7 @@ const createAllIngestionSchemas = ({
// Event schemas
const base = z.object({
id: idSchema,
- timestamp: z.iso.datetime({ offset: true }),
+ timestamp: isoDateTime({ offset: true }),
metadata: jsonSchema.nullish(),
});
diff --git a/packages/shared/src/utils/typeChecks.ts b/packages/shared/src/utils/typeChecks.ts
index 529683ead6..bf0d69038c 100644
--- a/packages/shared/src/utils/typeChecks.ts
+++ b/packages/shared/src/utils/typeChecks.ts
@@ -1,4 +1,4 @@
-import { z } from "zod";
+import { isoDateTime } from "./zod";
export const isPresent = <T>(value: T | null | undefined): value is T =>
value !== null && value !== undefined && value !== "";
@@ -7,4 +7,4 @@ export function assertUnreachable(_x: never): never {
throw new Error("Didn't expect to get here");
}
-export const stringDateTime = z.iso.datetime({ offset: true }).nullish();
+export const stringDateTime = isoDateTime({ offset: true }).nullish();
diff --git a/packages/shared/src/utils/zod.ts b/packages/shared/src/utils/zod.ts
index 9089da31ac..6db43e2d2c 100644
--- a/packages/shared/src/utils/zod.ts
+++ b/packages/shared/src/utils/zod.ts
@@ -2,6 +2,22 @@ import { InputJsonValue } from "@prisma/client/runtime/library";
import { z } from "zod";
import { InvalidRequestError } from "../errors";
+/** ISO datetimes with minutes, seconds, or fractional seconds; timezone required. */
+export function isoDateTime({
+ offset = false,
+ error = "Invalid ISO datetime",
+}: {
+ offset?: boolean;
+ error?: string | z.core.$ZodErrorMap;
+} = {}) {
+ // Share the date/time patterns once to keep tool schemas compact and union-free.
+ const date = z.regexes.date.source.slice(1, -1);
+ const time = z.regexes.time({}).source.slice(1, -1);
+ const timezone = offset ? "(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)" : "Z";
+ const pattern = new RegExp(`^${date}T${time}${timezone}$`);
+ return z.string({ error }).regex(pattern, { error });
+}
+
// to be used for Prisma JSON type
// @see: https://github.com/colinhacks/zod#json-type
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d8e7ced70d..b569a67acc 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -48,7 +48,7 @@ overrides:
esbuild: 0.28.1
undici@6: 6.29.1
undici@7: 7.30.1
- zod: 4.3.6
+ zod: 4.6.6
nanoid: 3.3.18
katex: ^0.16.21
tar-fs: ^2.1.2
@@ -134,8 +134,8 @@ importers:
specifier: workspace:*
version: link:../packages/shared
zod:
- specifier: 4.3.6
- version: 4.3.6
+ specifier: 4.6.6
+ version: 4.6.6
devDependencies:
'@repo/eslint-config':
specifier: workspace:*
@@ -271,8 +271,8 @@ importers:
packages/in-app-agent-sandbox-runtime:
dependencies:
zod:
- specifier: 4.3.6
- version: 4.3.6
+ specifier: 4.6.6
+ version: 4.6.6
devDependencies:
'@repo/typescript-config':
specifier: workspace:*
@@ -318,28 +318,28 @@ importers:
version: 0.0.52
'@ai-sdk/amazon-bedrock':
specifier: ^5.0.115
- version: 5.0.115([email protected])
+ version: 5.0.115([email protected])
'@ai-sdk/anthropic':
specifier: ^4.0.79
- version: 4.0.79([email protected])
+ version: 4.0.79([email protected])
'@ai-sdk/azure':
specifier: ^4.0.101
- version: 4.0.101([email protected])
+ version: 4.0.101([email protected])
'@ai-sdk/google':
specifier: ^4.0.95
- version: 4.0.95([email protected])
+ version: 4.0.95([email protected])
'@ai-sdk/google-vertex':
specifier: ^5.0.111
'@ai-sdk/openai':
specifier: ^4.0.93
- version: 4.0.93([email protected])
+ version: 4.0.93([email protected])
'@ai-sdk/openai-compatible':
specifier: ^3.0.68
- version: 3.0.68([email protected])
+ version: 3.0.68([email protected])
'@ai-sdk/typesafe-ai':
specifier: ^3.0.18
- version: 3.0.18([email protected])
+ version: 3.0.18([email protected])
'@aws-crypto/sha256-js':
specifier: 5.2.0
version: 5.2.0
@@ -411,7 +411,7 @@ importers:
version: 2.4.6
ai:
specifier: ^7.0.140
- version: 7.0.140([email protected])
+ version: 7.0.140([email protected])
ajv:
specifier: ^8.18.0
version: 8.20.0
@@ -494,8 +494,8 @@ importers:
specifier: ^3.15.0
version: 3.15.0
zod:
- specifier: 4.3.6
- version: 4.3.6
+ specifier: 4.6.6
+ version: 4.6.6
devDependencies:
'@opentelemetry/context-async-hooks':
specifier: ^2.9.0
@@ -619,7 +619,7 @@ importers:
version: 1.2.3
'@modelcontextprotocol/sdk':
specifier: 1.31.0
'@next-auth/prisma-adapter':
specifier: ^1.0.7
@@ -724,13 +724,13 @@ importers:
'@scalar/api-reference':
specifier: 1.66.1
'@sentry/nextjs':
specifier: ^10.64.0
'@t3-oss/env-nextjs':
specifier: ^0.11.1
'@tanstack/react-query':
specifier: ^5.85.1
version: 5.85.1([email protected])
@@ -957,8 +957,8 @@ importers:
specifier: ^2.9.0
version: 2.9.0
zod:
- specifier: 4.3.6
- version: 4.3.6
+ specifier: 4.6.6
+ version: 4.6.6
zustand:
specifier: ^5.0.14
@@ -1127,7 +1127,7 @@ importers:
version: 0.0.52
'@ag-ui/mastra':
specifier: 1.1.1
'@anthropic-ai/tokenizer':
specifier: ^0.0.4
version: 0.0.4
@@ -1145,10 +1145,10 @@ importers:
version: link:../packages/shared
'@mastra/core':
specifier: 1.46.0
'@mastra/mcp':
specifier: 1.8.1
'@node-rs/xxhash':
specifier: 1.7.7
version: 1.7.7
@@ -1199,19 +1199,19 @@ importers:
version: link:../packages/langfuse-skills
ai-sdk-amazon-bedrock-v4:
specifier: npm:@ai-sdk/[email protected]
ai-sdk-anthropic-v4:
specifier: npm:@ai-sdk/[email protected]
ai-sdk-google-vertex-v4:
specifier: npm:@ai-sdk/[email protected]
ai-sdk-openai-compatible-v4:
specifier: npm:@ai-sdk/[email protected]
ai-sdk-openai-v4:
specifier: npm:@ai-sdk/[email protected]
bullmq:
specifier: ^5.76.3
version: 5.76.3([email protected])
@@ -1267,8 +1267,8 @@ importers:
specifier: ^14.0.2
version: 14.0.2
zod:
- specifier: 4.3.6
- version: 4.3.6
+ specifier: 4.6.6
+ version: 4.6.6
devDependencies:
'@repo/eslint-config':
specifier: workspace:*
@@ -1367,145 +1367,145 @@ packages:
resolution: {integrity: sha512-SP3LIpFt/JlK0sGs6E5jvjySvQqu/nqA942PehIGk3PZPJ5SMPsUNg+PYTs84PTUYEg8rr4XqkQOTNFq12zo2w==}
engines: {node: '>=18'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-6kVu9VdRwkGIch66g0q6vY1dp4y8C8ia4i0cA76qu871igCQPWOS1B7ClGWh29cZBBLMmALaZXim6iZZSzWkpA==}
engines: {node: '>=22'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-atgBW8jZPr/KuaKX5FvDIHuXBI8VCol6kVeoD4P0657+VXR73QsLogXQVN/Zt5FHtq9WzpdIZseCJiXPqkgwwA==}
engines: {node: '>=18'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-CkShXR8tmNO7QQnvpKbSMe2Vr1zUUcpqlp69iR+DYrbHm+tDJO9u6zZsjEHjcoRU9/e9z++p0W6NiuLC3aZ4Bg==}
engines: {node: '>=18'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-bBAmgc8IcwJDz7RkyIHaGNrN6k84oqZu6K2aYcdekYwab8PNcxvUgp/LG1S/tSU3SBoS+blFYuMjTQrIg8WHRQ==}
engines: {node: '>=22'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-2jEVUL+w0KHztVVP6pN3VC46BCFbanE508B2ypGTHuS2wbuKma5chZjjM13vap65cK3LFUACHr5+J6vHpeLOHQ==}
engines: {node: '>=22'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-nv+NE2CzKykapKCYTsUlOZ+HBPPMNc0QYl3PKYHEy9cvorKTWDWtN/u4UCXs2Uj5VjDF9nNUg22gLOgDYCy+Lw==}
engines: {node: '>=22'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-R5r567od2Olqze/lL2dVS4wVOVyVqG6sJ3cEUI/kW12XQJYKf8fetyxWPYS0ZFe87QPcsh3Z3sDnrMAtAIiS3Q==}
engines: {node: '>=18'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-fYov5+sH1A20/eN1PaL5z8bZ9RUq0CcL9yAsAhCHz/qUCKliDOg9HXjNYzOUlH6o21lIrp/aKQc8QLGkEEZGlQ==}
engines: {node: '>=22'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-bqO5JwWtAlVeSL2R4tGm+qpqzjP/szns5MWpeESkJ8Ub8FwBchu2WynYhNih6hFDcau9n+BMtq72NJ2uZfs2Ew==}
engines: {node: '>=18'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-c4yfkxvUGZi7waSHBt4u4ujgUSHzYHDFWBkxwLL5J2nHQUC1xdL0uvV6ClBkyD6cZhMYyC53Vj5vT7SZOp0YBg==}
engines: {node: '>=22'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-XWWju5pVD7Tf30c2VziMfPph3XpN/jDTE5aJhqAPJ2zRmHSSveNYFoosFLOWWFIgQnwGe9AM3bAXR8kHyC2MdA==}
engines: {node: '>=18'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-EKIJUHuA1lvZqEg7Oeizop/TjyHPh01wtZ09kHf03Qd0MBQ4wCLpE/i9/8oXgDe/CVr7+TM9rAZE0ocjNt525Q==}
engines: {node: '>=22'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-2OUf83ezu8UmyN9knPo2AgJ+CoJronxvULgSUdA1GgTU0Codku7XnHjwKHppk9FPLDW0eg+Y4V6iOKWMTlqEzA==}
engines: {node: '>=18'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-+mDaUS0q460pVs3oW2/Ps/vj4M2EZnYr1v6ng8TmzxnZPrYBuK7PGQIfckqFdWIdUI/gG8BXcaf8vukLKyGU6Q==}
engines: {node: '>=22'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-xnBmn8wJvlRX4BtB2nJTzSoYHHD7OpZwUigwH0oKDzg5HfYx+rNFqOKUMQDUuOClhMyDRMn29q/rzp0M41vgQw==}
engines: {node: '>=22'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-0Y6E5bvR+3eugt5rq2iy39EAAFi4nijXf1kdvcfoMm4erEGMe/6egIpvdvv5ePBU2YsnsxFuLRmMJ76Kv/babQ==}
engines: {node: '>=18'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-UUTCBDWwkNvsbukMstaT31K6wYnL73vp0X4gQL1/7W3LZlHT1wOZ6eZzlwj76s/O+QLXefWF6+ceRgPwTOX6FA==}
engines: {node: '>=22'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-fqhG+4sCVv8x7nFzYnFo19ryhAa3w096Kmc3hWxMQfW/TubPOmt3A6tYZhl4mUfQWWQMsuSkLrtjlWuXBVSGQA==}
engines: {node: '>=18'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-nJ0bAfegMAIJtrzMJtbzer1cS3nb7c7DsyU1S4nrPm7ZU0Mn6SBBZv5IGZZGTbpWTJwqKTSPeZJTXalbAxt1BA==}
engines: {node: '>=18'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-OL5IrpUm9Y8Dwy+w/vvFwPotS6m52O9W0op2oXgXdCROMJIBalBI0oro6OIBYkPxvm5Xg02GSkoQN25RlR0bnw==}
engines: {node: '>=18'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-tEtld97plCFiYevsJuOkGkeuhQndeMWFBVrJS4AjnbD5AqrNSXRCe0p+BZ3Cju/sxDeeZ9ym3q9YUV8fASA7aQ==}
engines: {node: '>=18.17'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-El0JOXXGcHFe6+owJ1UV0VgB9XtdivP8vcZni+rUIt6lt+cBHCnUdddaA6LE2avJGJ5AD0uXSY+uAvRL2tSvgw==}
engines: {node: '>=22'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-eaXBTkguxBFzS+KvxGRsbdkX9A7+R1g/C4jWx9mup0oSs3Cx5Mb427/byGpD2XL8SnMYT9O8LmXBmrgo+N3TJw==}
engines: {node: '>=22'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-qZMxYJ0qqX/RfnuIaab+zp8UAeJn/ygXXAffR5I4N0n1IrvA6qBsjc8hXLmBiMV2zoXlifkacF7sEFnYnjBcqg==}
@@ -1547,13 +1547,13 @@ packages:
resolution: {integrity: sha512-pUBBtnLc8T6im7KKAHZmGaMZK6jbdLYl8LnPUDJN6XRoocZ3Sl5a7Zx+gqyCCKIxeU1m2vSYPLWyoiCqcbDD+w==}
engines: {node: '>=22'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-3zcwCc8ezzFlwp3ZD15wAPjf2Au4s3vAbKsXQVyhxODHcmu0iyPO2Eua6D/vicq/AUm/BAo60r97O6HU+EI0+w==}
engines: {node: '>=18'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
resolution: {integrity: sha512-czM9Js3a7f+Eo35gjEYEeJYUoPvMg5Dfi4bOLyDBghLqn0gaVg8yTmTaSuHCg+3K/+1xPjyXd4+2XcQIohWWiQ==}
@@ -2883,19 +2883,19 @@ packages:
resolution: {integrity: sha512-sp40SwMQnoCoLu4uu7hYnzlAl279DQTiiazvlAt54dFvzykkqZSQaDOn+gBA4XDtgCQBk4o4WD10SkORo2BQFQ==}
engines: {node: '>=22.13.0'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@mastra/[email protected]':
resolution: {integrity: sha512-0Fm1nOpTTcqYIpbipj8bWYGc9vjaJcKWxAK5X7kP177ijjdmSUQuM5Zk6RNYb6+LB4RmgdOdyWOKS4Rb4Ih1+w==}
engines: {node: '>=22.13.0'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@mastra/[email protected]':
resolution: {integrity: sha512-8w0O+7R9L125svWXHkTVLdHGjaWhvmJAJKfmvSLjgTfK0q0FZI29JlrCwcjqwY1kQTqb1yPzk6GJXh8xrJXiFA==}
engines: {node: '>=22.13.0'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@mastra/[email protected]':
resolution: {integrity: sha512-JZ3+BrXBSm4+sdk/PBW5boSRveKcox3o9TDxoIV+p/l5sJpcA8UjE66FZZ045nl4u212HVmRGAmTOY6msMPKxg==}
@@ -2907,13 +2907,13 @@ packages:
resolution: {integrity: sha512-8Fg8PeO7GsRPOrEZAzc5udZgsF9ZDxih5JSoxjgnR79d0ImjKffhcoysPW6wIYXPEZ5i6/QDNR7rCazZZSD5Tg==}
engines: {node: '>=22.13.0'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@mastra/[email protected]':
resolution: {integrity: sha512-VAWCXGuWuTqnljkheb3zKUujNK6rdGhFISxdSoSz3/d3HJWZOHY10mUnXw5lg0s73FdFDGg4tehbq28fAZz+lA==}
engines: {node: '>=22.13.0'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
'@mdx-js/[email protected]':
resolution: {integrity: sha512-f++rKLQgUVYDAtECQ6fn/is15GkEH9+nZPM3MS0RcxVqoTfawHvDlSCH7JbMhAM6uJ32v3eXLvLmLvjGu7PTQw==}
@@ -2931,7 +2931,7 @@ packages:
'@modelcontextprotocol/sdk': ^1.29.0
react: ^17.0.0 || ^18.0.0 || ^19.0.0
react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0
- zod: 4.3.6
+ zod: 4.6.6
peerDependenciesMeta:
react:
optional: true
@@ -2943,7 +2943,7 @@ packages:
engines: {node: '>=18'}
peerDependencies:
'@cfworker/json-schema': ^4.1.1
- zod: 4.3.6
+ zod: 4.6.6
peerDependenciesMeta:
'@cfworker/json-schema':
optional: true
@@ -5962,7 +5962,7 @@ packages:
sury: ^10.0.0
typebox: ^1.0.17
valibot: ^1.1.0
- zod: 4.3.6
+ zod: 4.6.6
zod-to-json-schema: ^3.24.5
peerDependenciesMeta:
'@valibot/to-json-schema':
@@ -5993,7 +5993,7 @@ packages:
sury: ^10.0.0
typebox: ^1.0.0
valibot: ^1.1.0
- zod: 4.3.6
+ zod: 4.6.6
zod-openapi: ^4
peerDependenciesMeta:
arktype:
@@ -6150,7 +6150,7 @@ packages:
resolution: {integrity: sha512-MaxOwEoG1ntCFoKJsS7nqwgcxLW1SJw238AJwfJeaz3P/8GtkxXZsPPolsz1AdYvUTbe3XvqZ/VCdfjt+3zmKw==}
peerDependencies:
typescript: '>=5.0.0'
- zod: 4.3.6
+ zod: 4.6.6
peerDependenciesMeta:
typescript:
optional: true
@@ -6159,7 +6159,7 @@ packages:
resolution: {integrity: sha512-rx2XL9+v6wtOqLNJbD5eD8OezKlQD1BtC0WvvtHwBgK66jnF5+wGqtgkKK4Ygie1LVmoDClths2T4tdFmRvGrQ==}
peerDependencies:
typescript: '>=5.0.0'
- zod: 4.3.6
+ zod: 4.6.6
peerDependenciesMeta:
typescript:
optional: true
@@ -7317,13 +7317,13 @@ packages:
resolution: {integrity: sha512-TQKOUPL7GLirkGvA2/sxA3bNzPeTY2w30mOyzwfQyiB8WvTQTr08mGgBBETPHwKIefgYF8HbLeVMgEahRVsX/Q==}
engines: {node: '>=18'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
resolution: {integrity: sha512-GHWqpUcY7EsRHc7jC99SqzpgabExb9w7anxDYa5N79AIVsGavIZFxZKhVQ/SORkuXFkPO4FG8cCSweaGutvwSw==}
engines: {node: '>=22'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==}
@@ -7668,7 +7668,7 @@ packages:
engines: {node: '>=20'}
peerDependencies:
ai: ^6.0.182
- zod: 4.3.6
+ zod: 4.6.6
peerDependenciesMeta:
ai:
optional: true
@@ -12649,16 +12649,16 @@ packages:
resolution: {integrity: sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA==}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
resolution: {integrity: sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==}
engines: {node: '>=18.0.0'}
peerDependencies:
- zod: 4.3.6
+ zod: 4.6.6
- resolution: {integrity: sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==}
+ resolution: {integrity: sha512-4UmzQUF5fxvfcYHlbjBmejU+w+hbDnWFx4aS8kBx7nPBHcO2SqPbpAG8snbdg+Xse4pRefR98hgjFgIMCI/UhA==}
resolution: {integrity: sha512-/8tAspM5LMPr28b3fwLYrtdj77ECpfZviaP75CMTnwO8ISyaE4GDIG/9rDDYq/cH9D2Xw2A2RXglLInmVBQB/g==}
@@ -12708,28 +12708,28 @@ snapshots:
rxjs: 7.8.1
untruncate-json: 0.0.1
uuid: 11.1.1
- zod: 4.3.6
+ zod: 4.6.6
dependencies:
- zod: 4.3.6
+ zod: 4.6.6
dependencies:
'@ag-ui/core': 0.0.52
'@ag-ui/proto': 0.0.52
dependencies:
'@ag-ui/a2ui-toolkit': 0.0.4
'@ag-ui/client': 0.0.52
'@ag-ui/core': 0.0.52
- '@ai-sdk/ui-utils': 1.2.11([email protected])
+ '@ai-sdk/ui-utils': 1.2.11([email protected])
fast-json-patch: 3.1.1
rxjs: 7.8.1
- zod: 4.3.6
+ zod: 4.6.6
dependencies:
@@ -12737,184 +12737,184 @@ snapshots:
'@bufbuild/protobuf': 2.12.0
'@protobuf-ts/protoc': 2.11.1
dependencies:
- '@ai-sdk/anthropic': 3.0.62([email protected])
+ '@ai-sdk/anthropic': 3.0.62([email protected])
'@ai-sdk/provider': 3.0.8
- '@ai-sdk/provider-utils': 4.0.33([email protected])
+ '@ai-sdk/provider-utils': 4.0.33([email protected])
'@smithy/eventstream-codec': 4.4.14
'@smithy/util-utf8': 4.4.14
aws4fetch: 1.0.20
- zod: 4.3.6
+ zod: 4.6.6
dependencies:
- '@ai-sdk/anthropic': 4.0.79([email protected])
- '@ai-sdk/openai': 4.0.93([email protected])
+ '@ai-sdk/anthropic': 4.0.79([email protected])
+ '@ai-sdk/openai': 4.0.93([email protected])
'@ai-sdk/provider': 4.0.27
- '@ai-sdk/provider-utils': 5.0.59([email protected])
+ '@ai-sdk/provider-utils': 5.0.59([email protected])
'@smithy/eventstream-codec': 4.4.14
'@smithy/util-utf8': 4.4.14
aws4fetch: 1.0.20
- zod: 4.3.6
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 3.0.15
- '@ai-sdk/provider-utils': 4.0.46([email protected])
- zod: 4.3.6
+ '@ai-sdk/provider-utils': 4.0.46([email protected])
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 3.0.8
- '@ai-sdk/provider-utils': 4.0.33([email protected])
- zod: 4.3.6
+ '@ai-sdk/provider-utils': 4.0.33([email protected])
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 4.0.27
- '@ai-sdk/provider-utils': 5.0.59([email protected])
- zod: 4.3.6
+ '@ai-sdk/provider-utils': 5.0.59([email protected])
+ zod: 4.6.6
dependencies:
- '@ai-sdk/deepseek': 3.0.64([email protected])
- '@ai-sdk/openai': 4.0.93([email protected])
+ '@ai-sdk/deepseek': 3.0.64([email protected])
+ '@ai-sdk/openai': 4.0.93([email protected])
'@ai-sdk/provider': 4.0.27
- '@ai-sdk/provider-utils': 5.0.59([email protected])
- zod: 4.3.6
+ '@ai-sdk/provider-utils': 5.0.59([email protected])
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 4.0.27
- '@ai-sdk/provider-utils': 5.0.59([email protected])
- zod: 4.3.6
+ '@ai-sdk/provider-utils': 5.0.59([email protected])
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 3.0.14
- '@ai-sdk/provider-utils': 4.0.40([email protected])
+ '@ai-sdk/provider-utils': 4.0.40([email protected])
'@vercel/oidc': 3.2.0
- zod: 4.3.6
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 4.0.27
- '@ai-sdk/provider-utils': 5.0.59([email protected])
+ '@ai-sdk/provider-utils': 5.0.59([email protected])
'@vercel/oidc': 3.2.0
- zod: 4.3.6
+ zod: 4.6.6
dependencies:
- '@ai-sdk/anthropic': 3.0.111([email protected])
- '@ai-sdk/google': 3.0.111([email protected])
- '@ai-sdk/openai-compatible': 2.0.70([email protected])
+ '@ai-sdk/anthropic': 3.0.111([email protected])
+ '@ai-sdk/google': 3.0.111([email protected])
+ '@ai-sdk/openai-compatible': 2.0.70([email protected])
'@ai-sdk/provider': 3.0.15
- '@ai-sdk/provider-utils': 4.0.46([email protected])
+ '@ai-sdk/provider-utils': 4.0.46([email protected])
google-auth-library: 10.6.2([email protected])
- zod: 4.3.6
+ zod: 4.6.6
transitivePeerDependencies:
- supports-color
dependencies:
- '@ai-sdk/anthropic': 4.0.79([email protected])
- '@ai-sdk/google': 4.0.95([email protected])
- '@ai-sdk/openai-compatible': 3.0.68([email protected])
+ '@ai-sdk/anthropic': 4.0.79([email protected])
+ '@ai-sdk/google': 4.0.95([email protected])
+ '@ai-sdk/openai-compatible': 3.0.68([email protected])
'@ai-sdk/provider': 4.0.27
- '@ai-sdk/provider-utils': 5.0.59([email protected])
+ '@ai-sdk/provider-utils': 5.0.59([email protected])
google-auth-library: 10.6.2([email protected])
- zod: 4.3.6
+ zod: 4.6.6
transitivePeerDependencies:
- supports-color
dependencies:
'@ai-sdk/provider': 3.0.15
- '@ai-sdk/provider-utils': 4.0.46([email protected])
- zod: 4.3.6
+ '@ai-sdk/provider-utils': 4.0.46([email protected])
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 4.0.27
- '@ai-sdk/provider-utils': 5.0.59([email protected])
- zod: 4.3.6
+ '@ai-sdk/provider-utils': 5.0.59([email protected])
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 3.0.15
- '@ai-sdk/provider-utils': 4.0.46([email protected])
- zod: 4.3.6
+ '@ai-sdk/provider-utils': 4.0.46([email protected])
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 4.0.1
- '@ai-sdk/provider-utils': 5.0.3([email protected])
- zod: 4.3.6
+ '@ai-sdk/provider-utils': 5.0.3([email protected])
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 4.0.27
- '@ai-sdk/provider-utils': 5.0.59([email protected])
- zod: 4.3.6
+ '@ai-sdk/provider-utils': 5.0.59([email protected])
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 3.0.15
- '@ai-sdk/provider-utils': 4.0.46([email protected])
- zod: 4.3.6
+ '@ai-sdk/provider-utils': 4.0.46([email protected])
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 4.0.27
- '@ai-sdk/provider-utils': 5.0.59([email protected])
- zod: 4.3.6
+ '@ai-sdk/provider-utils': 5.0.59([email protected])
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 1.1.3
nanoid: 3.3.18
secure-json-parse: 2.7.0
- zod: 4.3.6
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 3.0.12
'@standard-schema/spec': 1.1.0
eventsource-parser: 3.1.0
- zod: 4.3.6
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 3.0.14
'@standard-schema/spec': 1.1.0
eventsource-parser: 3.1.0
- zod: 4.3.6
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 3.0.15
'@standard-schema/spec': 1.1.0
eventsource-parser: 3.1.0
undici: 6.29.1
- zod: 4.3.6
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 4.0.1
'@standard-schema/spec': 1.1.0
'@workflow/serde': 4.1.0
eventsource-parser: 3.1.0
- zod: 4.3.6
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 4.0.27
'@standard-schema/spec': 1.1.0
'@workflow/serde': 4.1.0
eventsource-parser: 3.1.0
undici: 7.30.1
- zod: 4.3.6
+ zod: 4.6.6
'@ai-sdk/[email protected]':
dependencies:
@@ -12952,23 +12952,23 @@ snapshots:
dependencies:
json-schema: 0.4.0
dependencies:
'@ai-sdk/provider': 4.0.27
- '@ai-sdk/provider-utils': 5.0.59([email protected])
- zod: 4.3.6
+ '@ai-sdk/provider-utils': 5.0.59([email protected])
+ zod: 4.6.6
dependencies:
'@ai-sdk/provider': 1.1.3
- '@ai-sdk/provider-utils': 2.2.8([email protected])
- zod: 4.3.6
- zod-to-json-schema: 3.25.2([email protected])
+ '@ai-sdk/provider-utils': 2.2.8([email protected])
+ zod: 4.6.6
+ zod-to-json-schema: 3.25.2([email protected])
dependencies:
- '@ai-sdk/provider-utils': 4.0.33([email protected])
- ai: 6.0.230([email protected])
+ '@ai-sdk/provider-utils': 4.0.33([email protected])
+ ai: 6.0.230([email protected])
vue: 3.5.43([email protected])
transitivePeerDependencies:
@@ -14601,16 +14601,16 @@ snapshots:
'@marijn/[email protected]': {}
dependencies:
- '@ai-sdk/ui-utils': 1.2.11([email protected])
+ '@ai-sdk/ui-utils': 1.2.11([email protected])
'@lukeed/uuid': 2.0.1
- '@mastra/schema-compat': 1.2.10([email protected])
+ '@mastra/schema-compat': 1.2.10([email protected])
canonicalize: 1.0.8
jose: 6.2.3
json-schema: 0.4.0
- zod: 4.3.6
+ zod: 4.6.6
transitivePeerDependencies:
- '@bufbuild/protobuf'
- '@cfworker/json-schema'
@@ -14627,29 +14627,29 @@ snapshots:
- supports-color
- utf-8-validate
dependencies:
- '@ai-sdk/provider-utils-v5': '@ai-sdk/[email protected]([email protected])'
- '@ai-sdk/provider-utils-v6': '@ai-sdk/[email protected]([email protected])'
+ '@ai-sdk/provider-utils-v5': '@ai-sdk/[email protected]([email protected])'
+ '@ai-sdk/provider-utils-v6': '@ai-sdk/[email protected]([email protected])'
'@ai-sdk/provider-v5': '@ai-sdk/[email protected]'
'@ai-sdk/provider-v6': '@ai-sdk/[email protected]'
- '@ai-sdk/ui-utils-v5': '@ai-sdk/[email protected]([email protected])'
+ '@ai-sdk/ui-utils-v5': '@ai-sdk/[email protected]([email protected])'
'@isaacs/ttlcache': 2.1.5
'@lukeed/uuid': 2.0.1
- '@mastra/schema-compat': 1.2.10([email protected])
- '@modelcontextprotocol/sdk': 1.31.0(@cfworker/[email protected])([email protected])([email protected])
+ '@mastra/schema-compat': 1.2.10([email protected])
+ '@modelcontextprotocol/sdk': 1.31.0(@cfworker/[email protected])([email protected])([email protected])
'@sindresorhus/slugify': 2.2.1
'@standard-schema/spec': 1.1.0
ajv: 8.20.0
croner: 10.0.1
dotenv: 17.4.2
execa: 9.6.1
fastq: 1.20.1
gray-matter: 4.0.3
hono: 4.13.11
ignore: 7.0.6
json-schema: 0.4.0
lru-cache: 11.2.7
@@ -14660,7 +14660,7 @@ snapshots:
tokenx: 1.3.0
ws: 8.21.3
xxhash-wasm: 1.1.0
- zod: 4.3.6
+ zod: 4.6.6
transitivePeerDependencies:
- '@bufbuild/protobuf'
- '@cfworker/json-schema'
@@ -14677,21 +14677,21 @@ snapshots:
- supports-color
- utf-8-validate
dependencies:
- '@ai-sdk/provider-utils-v5': '@ai-sdk/[email protected]([email protected])'
- '@ai-sdk/provider-utils-v6': '@ai-sdk/[email protected]([email protected])'
+ '@ai-sdk/provider-utils-v5': '@ai-sdk/[email protected]([email protected])'
+ '@ai-sdk/provider-utils-v6': '@ai-sdk/[email protected]([email protected])'
'@ai-sdk/provider-v5': '@ai-sdk/[email protected]'
'@ai-sdk/provider-v6': '@ai-sdk/[email protected]'
'@isaacs/ttlcache': 2.1.5
'@lukeed/uuid': 2.0.1
- '@mastra/schema-compat': 1.3.0([email protected])
- '@modelcontextprotocol/sdk': 1.31.0(@cfworker/[email protected])([email protected])([email protected])
+ '@mastra/schema-compat': 1.3.0([email protected])
+ '@modelcontextprotocol/sdk': 1.31.0(@cfworker/[email protected])([email protected])([email protected])
'@sindresorhus/slugify': 2.2.1
'@standard-schema/spec': 1.1.0
ajv: 8.20.0
croner: 10.0.1
dotenv: 17.4.2
execa: 9.6.1
@@ -14708,7 +14708,7 @@ snapshots:
tokenx: 1.3.0
ws: 8.21.3
xxhash-wasm: 1.1.0
- zod: 4.3.6
+ zod: 4.6.6
transitivePeerDependencies:
- '@bufbuild/protobuf'
- '@cfworker/json-schema'
@@ -14720,11 +14720,11 @@ snapshots:
- supports-color
- utf-8-validate
dependencies:
- '@modelcontextprotocol/sdk': 1.31.0(@cfworker/[email protected])([email protected])([email protected])
+ '@modelcontextprotocol/sdk': 1.31.0(@cfworker/[email protected])([email protected])([email protected])
exit-hook: 5.1.0
fast-deep-equal: 3.1.3
transitivePeerDependencies:
@@ -14734,21 +14734,21 @@ snapshots:
- supports-color
- zod
dependencies:
json-schema-to-zod: 2.8.1
- zod: 4.3.6
+ zod: 4.6.6
zod-from-json-schema: 0.5.2
zod-from-json-schema-v3: [email protected]
- zod-to-json-schema: 3.25.2([email protected])
+ zod-to-json-schema: 3.25.2([email protected])
dependencies:
json-schema-to-zod: 2.8.1
- zod: 4.3.6
+ zod: 4.6.6
zod-from-json-schema: 0.5.2
zod-from-json-schema-v3: [email protected]
- zod-to-json-schema: 3.25.2([email protected])
+ zod-to-json-schema: 3.25.2([email protected])
dependencies:
@@ -14760,16 +14760,16 @@ snapshots:
dependencies:
'@chevrotain/types': 11.1.2
dependencies:
- '@modelcontextprotocol/sdk': 1.31.0(@cfworker/[email protected])([email protected])([email protected])
+ '@modelcontextprotocol/sdk': 1.31.0(@cfworker/[email protected])([email protected])([email protected])
'@standard-schema/spec': 1.1.0
- zod: 4.3.6
+ zod: 4.6.6
optionalDependencies:
react: 19.2.4
react-dom: 19.2.4([email protected])
dependencies:
'@hono/node-server': 1.19.17([email protected])
ajv: 8.20.0
@@ -14786,8 +14786,8 @@ snapshots:
json-schema-typed: 8.0.2
pkce-challenge: 5.0.1
raw-body: 3.0.2
- zod: 4.3.6
- zod-to-json-schema: 3.25.2([email protected])
+ zod: 4.6.6
+ zod-to-json-schema: 3.25.2([email protected])
optionalDependencies:
'@cfworker/json-schema': 4.1.1
transitivePeerDependencies:
@@ -16984,9 +16984,9 @@ snapshots:
'@rtsao/[email protected]': {}
dependencies:
'@scalar/helpers': 0.11.1
@@ -17000,7 +17000,7 @@ snapshots:
'@scalar/validation': 0.6.3
'@scalar/workspace-store': 0.58.1([email protected])
'@vueuse/core': 13.9.0([email protected]([email protected]))
- ai: 6.0.230([email protected])
+ ai: 6.0.230([email protected])
js-base64: 3.9.3
neverpanic: 0.0.8
truncate-json: 3.0.1
@@ -17053,7 +17053,7 @@ snapshots:
set-cookie-parser: 3.1.0
vue: 3.5.43([email protected])
yaml: 2.9.0
- zod: 4.3.6
+ zod: 4.6.6
transitivePeerDependencies:
- '@vue/composition-api'
- async-validator
@@ -17070,10 +17070,10 @@ snapshots:
- typescript
- universal-cookie
dependencies:
'@headlessui/vue': 1.7.23([email protected]([email protected]))
'@scalar/code-highlight': 0.4.5([email protected])
@@ -17251,7 +17251,7 @@ snapshots:
'@scalar/helpers': 0.11.1
nanoid: 3.3.18
type-fest: 5.8.0
- zod: 4.3.6
+ zod: 4.6.6
dependencies:
@@ -17636,24 +17636,24 @@ snapshots:
'@smithy/core': 3.30.0
tslib: 2.8.1
dependencies:
'@standard-schema/spec': 1.1.0
'@types/json-schema': 7.0.15
quansync: 0.2.11
optionalDependencies:
effect: 3.21.0
- zod: 4.3.6
- zod-to-json-schema: 3.25.2([email protected])
+ zod: 4.6.6
+ zod-to-json-schema: 3.25.2([email protected])
dependencies:
'@standard-schema/spec': 1.1.0
openapi-types: 12.1.3
optionalDependencies:
effect: 3.21.0
- zod: 4.3.6
+ zod: 4.6.6
'@standard-schema/[email protected]': {}
@@ -17802,16 +17802,16 @@ snapshots:
dependencies:
tslib: 2.8.1
dependencies:
- zod: 4.3.6
+ zod: 4.6.6
optionalDependencies:
typescript: 7.0.2
dependencies:
- '@t3-oss/env-core': 0.11.1([email protected])([email protected])
- zod: 4.3.6
+ '@t3-oss/env-core': 0.11.1([email protected])([email protected])
+ zod: 4.6.6
optionalDependencies:
typescript: 7.0.2
@@ -19079,20 +19079,20 @@ snapshots:
dependencies:
- '@ai-sdk/gateway': 3.0.153([email protected])
+ '@ai-sdk/gateway': 3.0.153([email protected])
'@ai-sdk/provider': 3.0.14
- '@ai-sdk/provider-utils': 4.0.40([email protected])
+ '@ai-sdk/provider-utils': 4.0.40([email protected])
'@opentelemetry/api': 1.9.1
- zod: 4.3.6
+ zod: 4.6.6
dependencies:
- '@ai-sdk/gateway': 4.0.113([email protected])
+ '@ai-sdk/gateway': 4.0.113([email protected])
'@ai-sdk/provider': 4.0.27
- '@ai-sdk/provider-utils': 5.0.59([email protected])
- zod: 4.3.6
+ '@ai-sdk/provider-utils': 5.0.59([email protected])
+ zod: 4.6.6
optionalDependencies:
@@ -19470,7 +19470,7 @@ snapshots:
dependencies:
'@workflow/serde': 4.1.0-beta.2
mdast-util-to-string: 4.0.0
@@ -19480,8 +19480,8 @@ snapshots:
remend: 1.3.0
unified: 11.0.5
optionalDependencies:
- ai: 6.0.230([email protected])
- zod: 4.3.6
+ ai: 6.0.230([email protected])
+ zod: 4.6.6
transitivePeerDependencies:
- supports-color
@@ -20516,8 +20516,8 @@ snapshots:
'@babel/parser': 7.29.8
hermes-parser: 0.25.1
- zod: 4.3.6
- zod-validation-error: 4.0.2([email protected])
+ zod: 4.6.6
+ zod-validation-error: 4.0.2([email protected])
transitivePeerDependencies:
- supports-color
@@ -21344,10 +21344,10 @@ snapshots:
dependencies:
'@types/json-schema': 7.0.15
openapi-types: 12.1.3
optionalDependencies:
@@ -21940,7 +21940,7 @@ snapshots:
tinyglobby: 0.2.17
unbash: 4.0.1
yaml: 2.9.0
- zod: 4.3.6
+ zod: 4.6.6
@@ -25433,21 +25433,21 @@ snapshots:
dependencies:
- zod: 4.3.6
+ zod: 4.6.6
dependencies:
- zod: 4.3.6
+ zod: 4.6.6
dependencies:
- zod: 4.3.6
+ zod: 4.6.6
dependencies:
- zod: 4.3.6
+ zod: 4.6.6
optionalDependencies:
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index e872fd347d..f309c98652 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -108,7 +108,7 @@ overrides:
# Keep both installed majors on their security-patched releases.
"undici@6": 6.29.1
"undici@7": 7.30.1
- zod: 4.3.6
+ zod: 4.6.6
nanoid: 3.3.18
katex: ^0.16.21
tar-fs: ^2.1.2
diff --git a/web/package.json b/web/package.json
index c1b08f8ec5..43bad5cb1c 100644
--- a/web/package.json
+++ b/web/package.json
@@ -174,7 +174,7 @@
"uuid": "^14.0.2",
"vaul": "^1.1.2",
"yaml": "^2.9.0",
- "zod": "^4.3.6",
+ "zod": "^4.6.6",
"zustand": "^5.0.14"
},
"devDependencies": {
diff --git a/web/src/__tests__/server/ingestion-api.servertest.ts b/web/src/__tests__/server/ingestion-api.servertest.ts
index ced5005db0..7fc8f0b7d7 100644
--- a/web/src/__tests__/server/ingestion-api.servertest.ts
+++ b/web/src/__tests__/server/ingestion-api.servertest.ts
@@ -8,9 +8,25 @@ import {
getScoreById,
getTraceById,
createOrgProjectAndApiKey,
+ ingestionEvent,
} from "@langfuse/shared/src/server";
import { v4 } from "uuid";
+describe("ingestion timestamp compatibility", () => {
+ it.each(["2024-02-29T06:15Z", "2024-02-29T06:15:00.123+02:30"])(
+ "accepts %s in both the envelope and body",
+ (timestamp) => {
+ const event = {
+ id: "event-id",
+ type: "trace-create",
+ timestamp,
+ body: { id: "trace-id", timestamp },
+ };
+ expect(ingestionEvent.parse(event)).toMatchObject(event);
+ },
+ );
+});
+
let projectId: string;
let auth: string;
let publicKey: string;
diff --git a/web/src/__tests__/server/metrics-api.servertest.ts b/web/src/__tests__/server/metrics-api.servertest.ts
index 125f6c648e..05265a8804 100644
--- a/web/src/__tests__/server/metrics-api.servertest.ts
+++ b/web/src/__tests__/server/metrics-api.servertest.ts
@@ -4,7 +4,11 @@ import {
makeZodVerifiedAPICallSilent,
makeAPICall,
} from "@/src/__tests__/test-utils";
-import { GetMetricsV1Response } from "@/src/features/public-api/types/metrics";
+import {
+ GetMetricsV1Query,
+ GetMetricsV2Query,
+ GetMetricsV1Response,
+} from "@/src/features/public-api/types/metrics";
import {
createBasicAuthHeader,
createTrace,
@@ -12,7 +16,25 @@ import {
createTracesCh,
createObservationsCh,
} from "@langfuse/shared/src/server";
-import { type QueryType } from "@langfuse/shared/query";
+import { query as querySchema, type QueryType } from "@langfuse/shared/query";
+
+describe("metrics timestamp compatibility", () => {
+ it.each(["2024-02-29T06:15Z", "2024-02-29T06:15:00.123+02:30"])(
+ "preserves %s through API and query-engine validation",
+ (fromTimestamp) => {
+ const input = {
+ view: "observations",
+ metrics: [],
+ fromTimestamp,
+ toTimestamp: "2024-03-01T00:00Z",
+ };
+ for (const schema of [GetMetricsV1Query, GetMetricsV2Query]) {
+ const parsed = schema.parse({ query: JSON.stringify(input) }).query;
+ expect(querySchema.parse(parsed)).toMatchObject(input);
+ }
+ },
+ );
+});
describe("/api/public/metrics API Endpoint", () => {
// Test setup variables
diff --git a/web/src/__tests__/server/score-configs.servertest.ts b/web/src/__tests__/server/score-configs.servertest.ts
index 213f8bff53..0cfefb15f5 100644
--- a/web/src/__tests__/server/score-configs.servertest.ts
+++ b/web/src/__tests__/server/score-configs.servertest.ts
@@ -5,6 +5,7 @@ import {
import {
GetScoreConfigResponse,
GetScoreConfigsResponse,
+ PostScoreConfigBody,
PostScoreConfigResponse,
PutScoreConfigResponse,
} from "@/src/features/public-api/types/score-configs";
@@ -16,6 +17,22 @@ import { type ScoreConfig, prisma } from "@langfuse/shared/src/db";
import { createOrgProjectAndApiKey } from "@langfuse/shared/src/server";
import { v4 } from "uuid";
+describe("score schema omission compatibility", () => {
+ it.each(["BOOLEAN", "TEXT"] as const)(
+ "accepts %s configs without categories",
+ (dataType) => {
+ const input = { name: "score config", dataType };
+
+ expect(PostScoreConfigBody.parse(input)).toEqual(input);
+ for (const categories of [null, []]) {
+ expect(
+ PostScoreConfigBody.safeParse({ ...input, categories }).success,
+ ).toBe(false);
+ }
+ },
+ );
+});
+
const configOne = [
{
projectId: "",
diff --git a/web/src/__tests__/server/scores-api-v1.servertest.ts b/web/src/__tests__/server/scores-api-v1.servertest.ts
index cf61a487b4..393ae9aa22 100644
--- a/web/src/__tests__/server/scores-api-v1.servertest.ts
+++ b/web/src/__tests__/server/scores-api-v1.servertest.ts
@@ -11,6 +11,7 @@ import {
createTracesCh,
createOrgProjectAndApiKey,
toClickhouseDateTime,
+ ScoreBody,
} from "@langfuse/shared/src/server";
import {
makeAPICall,
@@ -20,6 +21,8 @@ import {
DeleteScoreResponseV1,
GetScoreResponseV1,
GetScoresResponseV1,
+ NumericData,
+ PostScoreBodyV1,
} from "@langfuse/shared";
import { prisma } from "@langfuse/shared/src/db";
import { v4 } from "uuid";
@@ -66,6 +69,40 @@ type APIScoreV1WithValue = Extract<
{ value: number }
>;
+describe("score schema omission compatibility", () => {
+ it.each([
+ { name: "public API", schema: PostScoreBodyV1 },
+ { name: "ingestion", schema: ScoreBody },
+ ])("accepts inferred score types through $name", ({ schema }) => {
+ for (const value of [0.5, "positive"]) {
+ const input = { name: "inferred score", traceId: "trace-id", value };
+ const parsed = schema.parse(input);
+
+ expect(parsed).toMatchObject(input);
+ expect(parsed).not.toHaveProperty("dataType");
+ expect(schema.safeParse({ ...input, dataType: null }).success).toBe(
+ false,
+ );
+ expect(schema.safeParse({ ...input, dataType: "UNKNOWN" }).success).toBe(
+ false,
+ );
+ }
+ });
+
+ it("accepts numeric score data without a string value", () => {
+ expect(NumericData.parse({ dataType: "NUMERIC" })).toEqual({
+ dataType: "NUMERIC",
+ });
+ expect(
+ NumericData.safeParse({ dataType: "NUMERIC", stringValue: null }).success,
+ ).toBe(true);
+ expect(
+ NumericData.safeParse({ dataType: "NUMERIC", stringValue: "positive" })
+ .success,
+ ).toBe(false);
+ });
+});
+
describe("/api/public/scores API Endpoint", () => {
describe("GET /api/public/scores/:scoreId", () => {
it("should GET a score", async () => {
diff --git a/web/src/__tests__/server/unit/mcp-define-tool.servertest.ts b/web/src/__tests__/server/unit/mcp-define-tool.servertest.ts
index e9f0939922..d9494d1f31 100644
--- a/web/src/__tests__/server/unit/mcp-define-tool.servertest.ts
+++ b/web/src/__tests__/server/unit/mcp-define-tool.servertest.ts
@@ -1,17 +1,60 @@
-import { describe, expect, it } from "vitest";
+import { ToolSchema } from "@modelcontextprotocol/sdk/types.js";
+import { describe, expect, it, vi } from "vitest";
import { z } from "zod";
+import { isoDateTime } from "@langfuse/shared";
+import { mockServerContext } from "../mcp-helpers";
import { __dangerouslySkipAuthz } from "@/src/features/public-api/server";
import { defineTool } from "../../../features/mcp/core/define-tool";
+import type { ServerContext } from "../../../features/mcp/types";
describe("defineTool", () => {
- it("rejects intersection schemas", () => {
- const schema = z.object({ id: z.string() }).and(
- z.object({
- dataType: z.literal("NUMERIC"),
- value: z.number(),
- }),
+ it("publishes and validates both ISO timestamp precisions without a union", async () => {
+ const schema = z.object({ timestamp: isoDateTime({ offset: true }) });
+ const handler = vi.fn(async (input: z.infer<typeof schema>) => input);
+ const [tool, run] = defineTool({
+ name: "timestampTool",
+ description: "",
+ action: __dangerouslySkipAuthz,
+ baseSchema: schema,
+ inputSchema: schema,
+ handler,
+ });
+ const property = (
+ tool.inputSchema.properties as Record<
+ string,
+ { type: string; pattern: string }
+ >
+ ).timestamp;
+ expect(property).toEqual({ type: "string", pattern: expect.any(String) });
+ const pattern = new RegExp(property.pattern);
+ const context = mockServerContext();
+ for (const timestamp of [
+ "2024-02-29T06:15Z",
+ "2024-02-29T06:15:00.123+02:30",
+ ]) {
+ expect(pattern.test(timestamp)).toBe(true);
+ await run({ timestamp }, context);
+ expect(handler).toHaveBeenLastCalledWith({ timestamp }, context);
+ }
+ const invalid = "2024-02-30T06:15Z";
+ expect(pattern.test(invalid)).toBe(false);
+ await expect(run({ timestamp: invalid }, context)).rejects.toThrow(
+ "Validation failed",
);
+ expect(handler).toHaveBeenCalledTimes(2);
+ });
+
+ it("rejects intersections that emit allOf", () => {
+ const schema = z
+ .object({ id: z.string() })
+ .describe("Score identifier")
+ .and(
+ z.object({
+ dataType: z.literal("NUMERIC"),
+ value: z.number(),
+ }),
+ );
expect(() =>
defineTool({
@@ -25,6 +68,73 @@ describe("defineTool", () => {
).toThrow("Union and intersection schemas are not supported");
});
+ it("publishes flattened schemas and still validates tool inputs", async () => {
+ const schema = z.object({ id: z.string().min(1) }).and(
+ z.object({
+ filter: z
+ .object({ name: z.string().min(1) })
+ .and(z.object({ count: z.number().min(0) })),
+ value: z.union([z.string(), z.number()]),
+ }),
+ );
+ const handler = vi.fn(async (input: z.infer<typeof schema>) => input);
+ const [tool, run] = defineTool({
+ name: "flattenedTool",
+ description: "",
+ action: __dangerouslySkipAuthz,
+ baseSchema: schema,
+ inputSchema: schema,
+ handler,
+ });
+ const context: ServerContext = {
+ projectId: "project-id",
+ orgId: "org-id",
+ apiKeyId: "api-key-id",
+ accessLevel: "project",
+ publicKey: "pk-lf-test",
+ plan: "oss",
+ rateLimitOverrides: [],
+ };
+ const input = {
+ id: "score-id",
+ filter: { name: "score", count: 1 },
+ value: 1,
+ };
+
+ expect(ToolSchema.safeParse(tool).success).toBe(true);
+ expect(tool.inputSchema).toMatchObject({
+ type: "object",
+ required: ["id", "filter", "value"],
+ properties: {
+ id: { type: "string", minLength: 1 },
+ filter: {
+ type: "object",
+ required: ["name", "count"],
+ properties: {
+ name: { type: "string", minLength: 1 },
+ count: { type: "number", minimum: 0 },
+ },
+ },
+ value: { type: ["string", "number"] },
+ },
+ });
+ await expect(run(input, context)).resolves.toEqual(input);
+
+ for (const invalid of [
+ { filter: input.filter, value: input.value },
+ { ...input, id: "" },
+ { ...input, filter: { name: "score" } },
+ { ...input, filter: { name: "score", count: -1 } },
+ { ...input, value: true },
+ ]) {
+ // MCP clients submit unvalidated JSON to the typed handler.
+ await expect(
+ run(invalid as Parameters<typeof run>[0], context),
+ ).rejects.toThrow("Validation failed");
+ }
+ expect(handler).toHaveBeenCalledExactlyOnceWith(input, context);
+ });
+
it("preserves root type: 'object' for plain object schemas", () => {
const schema = z.object({ name: z.string() });
@@ -80,9 +190,9 @@ describe("defineTool", () => {
).toThrow("Union and intersection schemas are not supported");
});
- it("rejects nested union schemas", () => {
+ it("rejects constrained nested unions that emit anyOf", () => {
const schema = z.object({
- filter: z.union([z.string(), z.number()]),
+ filter: z.union([z.string().min(1), z.number()]),
});
expect(() =>
@@ -97,9 +207,12 @@ describe("defineTool", () => {
).toThrow("Union and intersection schemas are not supported");
});
- it("rejects nested intersection schemas", () => {
+ it("rejects nested intersections that emit allOf", () => {
const schema = z.object({
- filter: z.object({ id: z.string() }).and(z.object({ name: z.string() })),
+ filter: z
+ .object({ id: z.string() })
+ .describe("Score identifier")
+ .and(z.object({ name: z.string() })),
});
expect(() =>
diff --git a/web/src/__tests__/server/zod.servertest.ts b/web/src/__tests__/server/zod.servertest.ts
index 9c51eb49f8..d01fa5b612 100644
--- a/web/src/__tests__/server/zod.servertest.ts
+++ b/web/src/__tests__/server/zod.servertest.ts
@@ -1,15 +1,57 @@
import {
commaSeparatedEnumArray,
isJsonNumberLiteral,
+ isoDateTime,
optionalCommaSeparatedStringArray,
paginationZod,
parseJsonPrioritised,
publicApiPaginationLimitZod,
sanitizeEmailSubject,
StringNoHTML,
+ stringDateTime,
} from "@langfuse/shared";
+import { stringDateTime as ingestionDateTime } from "@langfuse/shared/src/server";
import { ZodError } from "zod";
+describe("ISO datetime compatibility", () => {
+ it("keeps UTC-only validation unless offsets are enabled", () => {
+ const schema = isoDateTime();
+ expect(schema.parse("2024-02-29T06:15Z")).toBe("2024-02-29T06:15Z");
+ expect(schema.parse("2024-02-29T06:15:00.123Z")).toBe(
+ "2024-02-29T06:15:00.123Z",
+ );
+ expect(schema.safeParse("2024-02-29T06:15+02:30").success).toBe(false);
+ expect(schema.safeParse("2024-02-29T06:15:00+02:30").success).toBe(false);
+ });
+
+ it.each([
+ ["2024-02-29T06:15Z", true],
+ ["2024-02-29T06:15+02:30", true],
+ ["2024-02-29T06:15-02:30", true],
+ ["2024-02-29T06:15:00Z", true],
+ ["2024-02-29T06:15:00.123456+02:30", true],
+ ["2023-02-29T06:15Z", false],
+ ["2024-02-30T06:15Z", false],
+ ["2024-02-29T24:00Z", false],
+ ["2024-02-29T06:60Z", false],
+ ["2024-02-29T06:15:60Z", false],
+ ["2024-02-29T06:15+24:00", false],
+ ["2024-02-29T06:15+02:60", false],
+ ["2024-02-29T06:15", false],
+ ["2024-02-29", false],
+ ["prefix2024-02-29T06:15Z", false],
+ ["2024-02-29T06:15Zsuffix", false],
+ [null, true],
+ [undefined, true],
+ ])("validates %s without changing the input", (input, valid) => {
+ for (const schema of [stringDateTime, ingestionDateTime]) {
+ const result = schema.safeParse(input);
+ expect(result.success).toBe(valid);
+ if (result.success) expect(result.data).toBe(input);
+ }
+ });
+});
+
// Create test cases
describe("Pagination Zod Schema", () => {
it("should validate valid input", () => {
diff --git a/web/src/ee/features/admin-api/server/apiKeys.ts b/web/src/ee/features/admin-api/server/apiKeys.ts
index 047f330adc..6b93e1881b 100644
--- a/web/src/ee/features/admin-api/server/apiKeys.ts
+++ b/web/src/ee/features/admin-api/server/apiKeys.ts
@@ -1,3 +1,4 @@
+import { isoDateTime } from "@langfuse/shared";
import { z } from "zod/v4";
import { type SystemRole } from "@langfuse/shared/src/db";
@@ -7,8 +8,7 @@ import { apiKeyCreationRoleSchema } from "@/src/features/public-api/server/apiKe
const apiKeyCreationFields = {
name: z.string().optional(),
note: z.string().optional(),
- expiresAt: z.iso
- .datetime({ offset: true })
+ expiresAt: isoDateTime({ offset: true })
.transform((value) => new Date(value))
.refine((value) => value.getTime() > Date.now(), {
message: "expiresAt must be in the future",
diff --git a/web/src/ee/features/billing/server/chb/chbMetricsApiHandler.ts b/web/src/ee/features/billing/server/chb/chbMetricsApiHandler.ts
index 740f70bbd3..aca5bd9122 100644
--- a/web/src/ee/features/billing/server/chb/chbMetricsApiHandler.ts
+++ b/web/src/ee/features/billing/server/chb/chbMetricsApiHandler.ts
@@ -1,3 +1,4 @@
+import { isoDateTime } from "@langfuse/shared";
import crypto from "crypto";
import { type NextRequest, NextResponse } from "next/server";
@@ -31,8 +32,8 @@ import {
const MAX_WINDOW_MS = 35 * 24 * 60 * 60 * 1000;
const MetricsQuerySchema = z.object({
- startTime: z.iso.datetime({ offset: true }),
- endTime: z.iso.datetime({ offset: true }),
+ startTime: isoDateTime({ offset: true }),
+ endTime: isoDateTime({ offset: true }),
resourceId: z.string().min(1),
});
diff --git a/web/src/ee/features/billing/server/chb/chbWebhookHandler.ts b/web/src/ee/features/billing/server/chb/chbWebhookHandler.ts
index 6b4993c3cc..cbcfb11e77 100644
--- a/web/src/ee/features/billing/server/chb/chbWebhookHandler.ts
+++ b/web/src/ee/features/billing/server/chb/chbWebhookHandler.ts
@@ -6,6 +6,7 @@ import { z } from "zod";
import { env } from "@/src/env.mjs";
import { auditLog } from "@/src/features/audit-logs/server";
import {
+ isoDateTime,
type ChbPlanCode,
chbPlanCodes,
chbPlanCodeToPlan,
@@ -74,7 +75,7 @@ const ChbEventBusTimestampSchema = z.union([z.number(), z.string()]).nullish();
const ChbWebhookEventSchema = z.object({
eventId: z.string().min(1),
type: ChbWebhookEventTypeSchema,
- occurredAt: z.iso.datetime({ offset: true }),
+ occurredAt: isoDateTime({ offset: true }),
data: z.object({
// Event-bus record id, not the attached plan id
id: z.string().nullish(),
diff --git a/web/src/features/events/server/eventsRouter.ts b/web/src/features/events/server/eventsRouter.ts
index 9bd1c092e1..4f5ecf388c 100644
--- a/web/src/features/events/server/eventsRouter.ts
+++ b/web/src/features/events/server/eventsRouter.ts
@@ -12,6 +12,7 @@ import {
protectedGetSessionProcedure,
} from "@/src/server/api/trpc";
import {
+ isoDateTime,
type OrderByState,
type SkillsAvailable,
type SkillsResourceLoaded,
@@ -555,8 +556,8 @@ export const eventsRouter = createTRPCRouter({
zodSchema.object({
projectId: zodSchema.string(),
traceId: zodSchema.string(),
- minStartTime: zodSchema.iso.datetime({ offset: true }),
- maxStartTime: zodSchema.iso.datetime({ offset: true }),
+ minStartTime: isoDateTime({ offset: true }),
+ maxStartTime: isoDateTime({ offset: true }),
}),
)
.query(async ({ input }): Promise<Required<AgentGraphDataResponse>[]> => {
diff --git a/web/src/features/mcp/server/datasets/tools/createDatasetRunItem.ts b/web/src/features/mcp/server/datasets/tools/createDatasetRunItem.ts
index c152e5e2be..3da52e845a 100644
--- a/web/src/features/mcp/server/datasets/tools/createDatasetRunItem.ts
+++ b/web/src/features/mcp/server/datasets/tools/createDatasetRunItem.ts
@@ -1,3 +1,4 @@
+import { isoDateTime } from "@langfuse/shared";
import { z } from "zod";
import { PostDatasetRunItemsV1Body } from "@/src/features/public-api/server";
import { createDatasetRunItemForApi } from "@/src/features/datasets/server";
@@ -24,7 +25,7 @@ const CreateDatasetRunItemBaseSchema = z.object({
"Trace ID linked to this run item. Provide this or observationId.",
),
datasetVersion: z.string().optional(),
- createdAt: z.iso.datetime({ offset: true }).optional(),
+ createdAt: isoDateTime({ offset: true }).optional(),
});
export const [createDatasetRunItemTool, handleCreateDatasetRunItem] =
diff --git a/web/src/features/mcp/server/evals/tools/testEvaluator.ts b/web/src/features/mcp/server/evals/tools/testEvaluator.ts
index 0cabbbf069..531aadbf74 100644
--- a/web/src/features/mcp/server/evals/tools/testEvaluator.ts
+++ b/web/src/features/mcp/server/evals/tools/testEvaluator.ts
@@ -1,4 +1,4 @@
-import { DecisionModelQuestionsSchema } from "@langfuse/shared";
+import { isoDateTime, DecisionModelQuestionsSchema } from "@langfuse/shared";
import { z } from "zod";
import { defineTool } from "../../../core/define-tool";
import { runMcpTool } from "../../../core/run-mcp-tool";
@@ -26,7 +26,7 @@ const TestEvaluatorInputBase = z
...DraftEvaluatorFields.shape,
observationId: z.string().min(1),
traceId: z.string().min(1),
- startTime: z.iso.datetime({ offset: true }),
+ startTime: isoDateTime({ offset: true }),
})
.strict();
diff --git a/web/src/features/mcp/server/metrics/tools/queryMetrics.ts b/web/src/features/mcp/server/metrics/tools/queryMetrics.ts
index f7f7234d09..d61fc3eb86 100644
--- a/web/src/features/mcp/server/metrics/tools/queryMetrics.ts
+++ b/web/src/features/mcp/server/metrics/tools/queryMetrics.ts
@@ -1,4 +1,4 @@
-import { InvalidRequestError } from "@langfuse/shared";
+import { isoDateTime, InvalidRequestError } from "@langfuse/shared";
import { executeQuery } from "@langfuse/shared/query/server";
import {
dimension,
@@ -124,16 +124,12 @@ const MetricsQueryObjectV2BaseSchema = z.object({
granularity: publicGranularities,
})
.optional(),
- fromTimestamp: z.iso
- .datetime({ offset: true })
- .describe(
- "Required start of the analytics time range, as an ISO 8601 timestamp with timezone (Z or an explicit offset). Must be before toTimestamp.",
- ),
- toTimestamp: z.iso
- .datetime({ offset: true })
- .describe(
- "Required end of the analytics time range, as an ISO 8601 timestamp with timezone. Must be after fromTimestamp. timeDimension.granularity controls aggregation buckets; it does not replace these explicit time bounds.",
- ),
+ fromTimestamp: isoDateTime({ offset: true }).describe(
+ "Required start of the analytics time range, as an ISO 8601 timestamp with timezone (Z or an explicit offset). Must be before toTimestamp.",
+ ),
+ toTimestamp: isoDateTime({ offset: true }).describe(
+ "Required end of the analytics time range, as an ISO 8601 timestamp with timezone. Must be after fromTimestamp. timeDimension.granularity controls aggregation buckets; it does not replace these explicit time bounds.",
+ ),
orderBy: z
.array(
z.object({
diff --git a/web/src/features/mcp/server/observations/tools/getObservation.ts b/web/src/features/mcp/server/observations/tools/getObservation.ts
index 1ffa8476fb..c548f6c08a 100644
--- a/web/src/features/mcp/server/observations/tools/getObservation.ts
+++ b/web/src/features/mcp/server/observations/tools/getObservation.ts
@@ -1,4 +1,4 @@
-import { LangfuseNotFoundError } from "@langfuse/shared";
+import { isoDateTime, LangfuseNotFoundError } from "@langfuse/shared";
import { z } from "zod";
import {
getObservationsV2FromEventsTableForPublicApi,
@@ -22,16 +22,12 @@ const OBSERVATION_MAX_RANGE_MS = 90 * 24 * 60 * 60 * 1000; // 90 days
const GetObservationBaseSchema = z.object({
observationId: z.string().min(1),
traceId: z.string().min(1).optional(),
- fromStartTime: z.iso
- .datetime({ offset: true })
- .describe(
- "Required inclusive lower bound on observation startTime, as an ISO 8601 timestamp with timezone (Z or an explicit offset). Must be before toStartTime; the elapsed duration must not exceed 90 days (2160 hours).",
- ),
- toStartTime: z.iso
- .datetime({ offset: true })
- .describe(
- "Required exclusive upper bound on observation startTime, as an ISO 8601 timestamp with timezone. Must be after fromStartTime and at most 2160 hours later. The observation's startTime must be strictly before this bound.",
- ),
+ fromStartTime: isoDateTime({ offset: true }).describe(
+ "Required inclusive lower bound on observation startTime, as an ISO 8601 timestamp with timezone (Z or an explicit offset). Must be before toStartTime; the elapsed duration must not exceed 90 days (2160 hours).",
+ ),
+ toStartTime: isoDateTime({ offset: true }).describe(
+ "Required exclusive upper bound on observation startTime, as an ISO 8601 timestamp with timezone. Must be after fromStartTime and at most 2160 hours later. The observation's startTime must be strictly before this bound.",
+ ),
fields: ObservationFieldsSchema,
expandMetadataKeys: ExpandMetadataKeysSchema,
});
diff --git a/web/src/features/mcp/server/observations/tools/getObservationFilterValues.ts b/web/src/features/mcp/server/observations/tools/getObservationFilterValues.ts
index 59bd29f6bf..5fd13ee3d4 100644
--- a/web/src/features/mcp/server/observations/tools/getObservationFilterValues.ts
+++ b/web/src/features/mcp/server/observations/tools/getObservationFilterValues.ts
@@ -1,4 +1,5 @@
import {
+ isoDateTime,
InvalidRequestError,
ObservationTypeDomain,
isNumericEventsTableColumnId,
@@ -46,14 +47,12 @@ type FilterValueColumn = z.infer<typeof FilterValueColumnSchema>;
const GetObservationFilterValuesBaseSchema = z.object({
column: FilterValueColumnSchema,
- fromStartTime: z.iso
- .datetime({ offset: true })
+ fromStartTime: isoDateTime({ offset: true })
.optional()
.describe(
"Optional inclusive lower bound on observation startTime, as an ISO 8601 timestamp with timezone (Z or an explicit offset). Use the same time window as the observations you intend to search.",
),
- toStartTime: z.iso
- .datetime({ offset: true })
+ toStartTime: isoDateTime({ offset: true })
.optional()
.describe(
"Optional exclusive upper bound on observation startTime, as an ISO 8601 timestamp with timezone. For a full calendar day, use midnight at the start of the next day, not 23:59:59.",
diff --git a/web/src/features/mcp/server/observations/tools/listObservations.ts b/web/src/features/mcp/server/observations/tools/listObservations.ts
index 434c6957c8..8b19e38a6c 100644
--- a/web/src/features/mcp/server/observations/tools/listObservations.ts
+++ b/web/src/features/mcp/server/observations/tools/listObservations.ts
@@ -1,4 +1,5 @@
import {
+ isoDateTime,
InvalidRequestError,
OBSERVATION_MCP_ALLOWED_EVENTS_TABLE_FILTER_COLUMNS,
booleanFilter,
@@ -287,16 +288,12 @@ const ListObservationsBaseSchema = z.object({
.describe(
"Environment to filter by. Multiple environments are temporarily unsupported until the public observations API applies allow-multiple environment filters correctly.",
),
- fromStartTime: z.iso
- .datetime({ offset: true })
- .describe(
- "Required inclusive lower bound on observation startTime, as an ISO 8601 timestamp with timezone (Z or an explicit offset). Must be before toStartTime; the elapsed duration must not exceed 14 days (336 hours).",
- ),
- toStartTime: z.iso
- .datetime({ offset: true })
- .describe(
- "Required exclusive upper bound on observation startTime, as an ISO 8601 timestamp with timezone. Must be after fromStartTime and at most 336 hours later. For 14 full UTC calendar days starting 2026-10-01T00:00:00Z, use 2026-10-15T00:00:00Z, not 2026-10-15T23:59:59Z. Split longer ranges into adjacent requests of at most 336 hours each.",
- ),
+ fromStartTime: isoDateTime({ offset: true }).describe(
+ "Required inclusive lower bound on observation startTime, as an ISO 8601 timestamp with timezone (Z or an explicit offset). Must be before toStartTime; the elapsed duration must not exceed 14 days (336 hours).",
+ ),
+ toStartTime: isoDateTime({ offset: true }).describe(
+ "Required exclusive upper bound on observation startTime, as an ISO 8601 timestamp with timezone. Must be after fromStartTime and at most 336 hours later. For 14 full UTC calendar days starting 2026-10-01T00:00:00Z, use 2026-10-15T00:00:00Z, not 2026-10-15T23:59:59Z. Split longer ranges into adjacent requests of at most 336 hours each.",
+ ),
filter: z
.array(ObservationMcpFilterBaseSchema)
.optional()
diff --git a/web/src/features/mcp/server/prompts/tools/listPrompts.ts b/web/src/features/mcp/server/prompts/tools/listPrompts.ts
index aa925f6e13..f03aad0dfb 100644
--- a/web/src/features/mcp/server/prompts/tools/listPrompts.ts
+++ b/web/src/features/mcp/server/prompts/tools/listPrompts.ts
@@ -1,3 +1,4 @@
+import { isoDateTime } from "@langfuse/shared";
/**
* MCP Tool: listPrompts
*
@@ -18,15 +19,13 @@ import { buildPromptUrl } from "@langfuse/shared/src/server";
import { runMcpTool } from "../../../core/run-mcp-tool";
import { paginationMeta } from "../../publicApi";
-const ParamFromUpdatedAt = z.iso
- .datetime({ offset: true })
+const ParamFromUpdatedAt = isoDateTime({ offset: true })
.optional()
.describe(
"Filter prompts updated at or after this timestamp (ISO 8601 with timezone, e.g. 2026-02-02T00:00:00Z)",
);
-const ParamToUpdatedAt = z.iso
- .datetime({ offset: true })
+const ParamToUpdatedAt = isoDateTime({ offset: true })
.optional()
.describe(
"Filter prompts updated at or before this timestamp (ISO 8601 with timezone, e.g. 2026-02-02T00:00:00Z)",
diff --git a/web/src/features/mcp/server/scores/tools/listScores.ts b/web/src/features/mcp/server/scores/tools/listScores.ts
index 9f6d4a09f9..59833c4524 100644
--- a/web/src/features/mcp/server/scores/tools/listScores.ts
+++ b/web/src/features/mcp/server/scores/tools/listScores.ts
@@ -1,4 +1,5 @@
import {
+ isoDateTime,
InvalidRequestError,
SCORE_FIELD_GROUPS_V3,
ScoreDataTypeDomain,
@@ -48,14 +49,12 @@ const ListScoresBaseSchema = z
.array(z.string())
.optional()
.describe("same ID as datasetRunId in createScore"),
- fromTimestamp: z.iso
- .datetime({ offset: true })
+ fromTimestamp: isoDateTime({ offset: true })
.optional()
.describe(
"Optional inclusive lower bound on the score timestamp, as an ISO 8601 timestamp with timezone (Z or an explicit offset). Filters scores by their own timestamp, not the associated observation's startTime.",
),
- toTimestamp: z.iso
- .datetime({ offset: true })
+ toTimestamp: isoDateTime({ offset: true })
.optional()
.describe(
"Optional exclusive upper bound on the score timestamp, as an ISO 8601 timestamp with timezone. For a full calendar day, use midnight at the start of the next day, not 23:59:59.",
diff --git a/web/src/features/public-api/types/experiments.ts b/web/src/features/public-api/types/experiments.ts
index be44207564..b9c9899f78 100644
--- a/web/src/features/public-api/types/experiments.ts
+++ b/web/src/features/public-api/types/experiments.ts
@@ -1,4 +1,5 @@
import {
+ isoDateTime,
APIScoreSchemaV3,
commaSeparatedEnumArray,
eventsTableSingleFilter,
@@ -91,7 +92,7 @@ const experimentScoreLimitZod = z.preprocess(
// start_time (the partition and primary-key column). Keep it required unless a
// different scan guard is added. The custom error explains the requirement
// instead of surfacing a bare format error when the parameter is omitted.
-const requiredFromStartTime = z.iso.datetime({
+const requiredFromStartTime = isoDateTime({
offset: true,
error: (issue) =>
issue.input === undefined
@@ -133,7 +134,7 @@ export const GetExperimentsV1ParsedQuery = z.object({
scoreLimit: experimentScoreLimitZod,
cursor: EncodedExperimentCursorV1.optional(),
fromStartTime: requiredFromStartTime,
- toStartTime: z.iso.datetime({ offset: true }).optional(),
+ toStartTime: isoDateTime({ offset: true }).optional(),
id: optionalStringArrayZod,
name: optionalStringArrayZod,
datasetId: optionalStringArrayZod,
@@ -147,7 +148,7 @@ export const GetExperimentsV1Query = z
scoreLimit: experimentScoreLimitZod,
cursor: EncodedExperimentsCursorString.optional(),
fromStartTime: requiredFromStartTime,
- toStartTime: z.iso.datetime({ offset: true }).optional(),
+ toStartTime: isoDateTime({ offset: true }).optional(),
id: optionalCommaSeparatedStringArray,
name: optionalCommaSeparatedStringArray,
datasetId: optionalCommaSeparatedStringArray,
@@ -165,7 +166,7 @@ export const GetExperimentItemsV1ParsedQueryBase = z.object({
scoreLimit: experimentScoreLimitZod,
cursor: EncodedExperimentCursorV1.optional(),
fromStartTime: requiredFromStartTime,
- toStartTime: z.iso.datetime({ offset: true }).optional(),
+ toStartTime: isoDateTime({ offset: true }).optional(),
experimentId: optionalStringArrayZod,
experimentName: optionalStringArrayZod,
experimentItemId: optionalStringArrayZod,
@@ -184,7 +185,7 @@ export const GetExperimentItemsV1Query = z
scoreLimit: experimentScoreLimitZod,
cursor: EncodedExperimentsCursorString.optional(),
fromStartTime: requiredFromStartTime,
- toStartTime: z.iso.datetime({ offset: true }).optional(),
+ toStartTime: isoDateTime({ offset: true }).optional(),
experimentId: optionalCommaSeparatedStringArray,
experimentName: optionalCommaSeparatedStringArray,
experimentItemId: optionalCommaSeparatedStringArray,
diff --git a/web/src/features/public-api/types/metrics.ts b/web/src/features/public-api/types/metrics.ts
index 99eed60464..4ab52f33c3 100644
--- a/web/src/features/public-api/types/metrics.ts
+++ b/web/src/features/public-api/types/metrics.ts
@@ -1,4 +1,5 @@
import {
+ isoDateTime,
deprecationResponseZod,
InvalidRequestError,
paginationMetaResponseZod,
@@ -46,8 +47,8 @@ const MetricsQueryObject = z
.nullable()
.optional()
.default(null),
- fromTimestamp: z.iso.datetime({ offset: true }),
- toTimestamp: z.iso.datetime({ offset: true }),
+ fromTimestamp: isoDateTime({ offset: true }),
+ toTimestamp: isoDateTime({ offset: true }),
orderBy: z
.array(
z.object({
@@ -114,8 +115,8 @@ export const MetricsQueryObjectV2 = z
.nullable()
.optional()
.default(null),
- fromTimestamp: z.iso.datetime({ offset: true }),
- toTimestamp: z.iso.datetime({ offset: true }),
+ fromTimestamp: isoDateTime({ offset: true }),
+ toTimestamp: isoDateTime({ offset: true }),
orderBy: z
.array(
z.object({
diff --git a/web/src/features/public-api/types/score-configs.ts b/web/src/features/public-api/types/score-configs.ts
index 6c99f6be1d..ac8458d439 100644
--- a/web/src/features/public-api/types/score-configs.ts
+++ b/web/src/features/public-api/types/score-configs.ts
@@ -96,14 +96,14 @@ export const PostScoreConfigBody = z
// Boolean config API POST body will always infer the categories based on data type
...z.object({
dataType: z.literal("BOOLEAN"),
- categories: z.undefined(),
+ categories: z.undefined().optional(),
}).shape,
}),
z.object({
...PostScoreConfigBase.shape,
...z.object({
dataType: z.literal("TEXT"),
- categories: z.undefined(),
+ categories: z.undefined().optional(),
maxValue: z.undefined().nullish(),
minValue: z.undefined().nullish(),
}).shape,
diff --git a/web/src/server/api/routers/traces.ts b/web/src/server/api/routers/traces.ts
index 135eaa01c6..60bcbdaf69 100644
--- a/web/src/server/api/routers/traces.ts
+++ b/web/src/server/api/routers/traces.ts
@@ -35,6 +35,7 @@ import {
protectedProjectProcedure,
} from "@/src/server/api/trpc";
import {
+ isoDateTime,
BatchActionQuerySchema,
BatchTableNames,
BatchExportTableName,
@@ -676,8 +677,8 @@ export const traceRouter = createTRPCRouter({
z.object({
projectId: z.string(),
traceId: z.string(),
- minStartTime: z.iso.datetime({ offset: true }),
- maxStartTime: z.iso.datetime({ offset: true }),
+ minStartTime: isoDateTime({ offset: true }),
+ maxStartTime: isoDateTime({ offset: true }),
// Optional fields for enforceTraceAccess middleware (supports public traces)
timestamp: z.date().nullish(),
fromTimestamp: z.date().nullish(),
diff --git a/worker/package.json b/worker/package.json
index d6765dd078..c122055e46 100644
--- a/worker/package.json
+++ b/worker/package.json
@@ -81,7 +81,7 @@
"stripe": "^17.4.0",
"tiktoken": "^1.0.20",
"uuid": "^14.0.2",
- "zod": "^4.3.6"
+ "zod": "^4.6.6"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
diff --git a/worker/src/features/in-app-agent/runtime/tools.ts b/worker/src/features/in-app-agent/runtime/tools.ts
index 6307446be6..debcb3bb33 100644
--- a/worker/src/features/in-app-agent/runtime/tools.ts
+++ b/worker/src/features/in-app-agent/runtime/tools.ts
@@ -4,7 +4,7 @@ import {
} from "@mastra/core/schema";
import { createTool, Tool } from "@mastra/core/tools";
import type { InAppAgentSandbox } from "./sandbox";
-import { assertUnreachable } from "@langfuse/shared";
+import { isoDateTime, assertUnreachable } from "@langfuse/shared";
import { getToolFailureMessage } from "@langfuse/shared/in-app-agent/server/toolErrors";
import {
buildDashboardsPath,
@@ -285,16 +285,16 @@ const InAppAgentTableTimeRangeStrictSchema = z.union([
preset: InAppAgentTableTimeRangePresetSchema,
}),
z.object({
- from: z.iso.datetime(),
- to: z.iso.datetime(),
+ from: isoDateTime(),
+ to: isoDateTime(),
}),
]);
const InAppAgentTableTimeRangeSchema = z
.object({
preset: InAppAgentTableTimeRangePresetSchema.optional(),
- from: z.iso.datetime().optional(),
- to: z.iso.datetime().optional(),
+ from: isoDateTime().optional(),
+ to: isoDateTime().optional(),
})
.superRefine((value, ctx) => {
if (!InAppAgentTableTimeRangeStrictSchema.safeParse(value).success) {
@@ -407,7 +407,7 @@ const InAppAgentRedirectToolInputStrictSchema = z.discriminatedUnion(
InAppAgentRedirectBaseSchema.extend({
destination: z.literal("trace"),
params: z.object({
- timestamp: z.iso.datetime().optional(),
+ timestamp: isoDateTime().optional(),
traceId: z.string().min(1).max(200),
}),
}),
@@ -422,7 +422,7 @@ const InAppAgentRedirectParamsSchema = z.object({
folder: z.string().min(1).max(200).optional(),
page: InAppAgentProjectSettingsPageSchema.optional(),
sessionId: z.string().min(1).max(200).optional(),
- timestamp: z.iso.datetime().optional(),
+ timestamp: isoDateTime().optional(),
traceId: z.string().min(1).max(200).optional(),
widgetId: z.string().min(1).max(200).optional(),
filters: InAppAgentTracingFiltersSchema.optional(),