Skip to content

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

fix(models): allow string tokenizer config (#4898)

Hassieb Pakzadd3f3f354dbe9
diff --git a/web/src/features/models/validation.ts b/web/src/features/models/validation.ts
index 4a863347a0..ade67e9b6f 100644
--- a/web/src/features/models/validation.ts
+++ b/web/src/features/models/validation.ts
@@ -17,9 +17,10 @@ export const GetModelResultSchema = z.object({
projectId: z.string().nullable(),
modelName: z.string(),
matchPattern: z.string(),
- tokenizerConfig: z
- .record(z.union([z.string(), z.coerce.number()]))
- .nullable(),
+ tokenizerConfig: z.union([
+ z.record(z.union([z.string(), z.coerce.number()])).nullable(),
+ z.string(),
+ ]),
tokenizerId: TokenizerSchema,
prices: PriceMapSchema,
});