wooden-umbrella-84098
04/02/2026, 2:37 PMwooden-umbrella-84098
04/02/2026, 2:38 PMmillions-afternoon-47582
04/02/2026, 2:46 PMwooden-umbrella-84098
04/02/2026, 3:02 PMwooden-umbrella-84098
04/02/2026, 3:03 PMcalm-artist-7206
04/02/2026, 3:15 PMAgentErrorEvent, which I think maybe it's not the right thing to do, conceptually.
• AgentErrorEvent is just a transitory LLM blunder that the agent just fixes next step
• application-level errors should not reuse it. They are application-level errors.
As long as we use one for the other, the result is error-prone and bugs keep creeping up everywhere.
Please note that these 3-4 times that the billing error returned, are linked to 3-4 times (and still not fully solved) of the complementary issue: the huge red ERROR when the LLM makes a blunder, and the huge toast when the LLM makes a blunder, none of which should happen, I thinkcalm-artist-7206
04/02/2026, 3:16 PMcalm-artist-7206
04/02/2026, 3:21 PMmillions-afternoon-47582
04/02/2026, 3:33 PMmillions-afternoon-47582
04/02/2026, 5:49 PMcalm-artist-7206
04/02/2026, 6:44 PMAgentErrorEvent , because that's where FE expects the billing error, it seems.
As you clearly proved here, it can never be there. 😅
I see that the FE code does:
// Track credit limit reached if AgentErrorEvent has budget-related error
if (isAgentErrorEvent(event)) {
trackError({
message: event.error,
...
// Use friendly i18n message for budget/credit errors instead of raw error
if (isBudgetOrCreditError(event.error)) {
setErrorMessage(I18nKey.STATUS$ERROR_LLM_OUT_OF_CREDITS);
trackCreditLimitReached({
conversationId: conversationId || "unknown",
});
} else {
setErrorMessage(event.error);
It'll never find it. Can we remove this code, so it stops confusing us?
Also, please note, it seems the setErrorMessage in that else block makes the red banner appear? For all AgentErrorEvent , but not billing, which seems... upside down. 😅millions-afternoon-47582
04/02/2026, 6:46 PMcalm-artist-7206
04/02/2026, 7:33 PMAgentErrorEvent
It’s going to be awesome to get rid of this confusion, thank you for looking into this!