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:
parent
9b05d4eb9f
commit
679479778c
4 changed files with 51 additions and 3 deletions
Loading…
Add table
Add a link
Reference in a new issue