Agent Unknown Error
Hey team, any tips for finding the root cause of errors like this? Using ai-sdk v5, with agent streamVNext
9 Replies
Ah after digging it was TPM rate limit error
Would traces have shown this? I can't seem to get traces in my Postgres layer
Hey @Chad Holmes ! It looks like we're not bubbling the error up properly. I'm not sure traces would have helped.
Are you using the new AI tracing?
I don't think so - I was only able to find it after configuring custom logging at the ai-sdk layer. I am on the latest version of mastra though, happy to try out new tracing if that could work!
Got it! The new AI tracing is going to be our new observability solution (the current OTEL one will be deprecated at some point). You can find docs at https://mastra.ai/en/docs/observability/ai-tracing/overview
One thing, you mentioned that you're using postgres, the adapater for postgres is going to be released today, so you might not be able to test it out until that is released. (unless you want to test it out with libsql)
AI Tracing | Observability | Mastra Docs
Set up AI tracing for Mastra applications
Serendipitious timing! Thanks so much @Romain will be v excited to try it out today
📝 Created GitHub issue: https://github.com/mastra-ai/mastra/issues/8349
GitHub
[DISCORD:1422621600590594088] Agent Unknown Error · Issue #8349 ·...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1422621600590594088 Hey team, any tips for finding the root cause of errors like this? Using ai-sdk v5, wi...
Can you try updating all mastra packages to their latest version?
Hi team, I updated! And we were able to solve the error. However I am now trying to enable tracing and seeing the following error
Was postgres adaption for tracing not enabled by the most recent update?
Wait now, I figured out how to get the upgrade to work, but I'm not seeing any traces get written
Seeing this without the storage adapter despite having success with messages and threads getting posted to postgres
Okay all solved, didn't realize these are writing to a new table
mastra_ai_spans
Awesome, glad you figured it out! Let me know if you're running into other issues 😉