0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00

[MASTRA-2628] Check Evals are valid before inserting into storage (#3095)

This PR adds checks for evals before inserting them into storage in
order to check that the fields are valid. If the fields are not valid
(are undefined, null or empty). The eval is not inserted, with a warning
given on what fields are missing.

Context:
There was a bug yesterday where someone using groq got a null output,
which caused a SQL error when inserting into evals due to constraint
violations.

This was also tested by removing instructions from an agent. This gave a
type error, but still allowed me to run the playground and use the
agent. After sending a message to the agent, it threw an error due to
evals constraints.
This commit is contained in:
NikAiyer 2025-03-21 12:32:46 -05:00 • committed by GitHub
commit 679479778c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 51 additions and 3 deletions