Commit 7e0c4ad
committed
fix(auto-reply/followup): surface billing notice on message_tool_only and reuse shared classifiers
Address review feedback on the followup billing/quota notice:
- Surface the notice on the default message_tool_only delivery path too.
Previously the notice was suppressed when sourceReplyDeliveryMode was
message_tool_only, which is exactly the path where a user would otherwise
see dead air. Remove the suppression so a billing/quota/rate-limit failure
always produces a short notice.
- Reuse the shared failover-matches classifiers (isBillingErrorMessage,
isRateLimitErrorMessage, isPeriodicUsageLimitErrorMessage) instead of a
narrower local substring list, so followup failure classification stays in
lock-step with the rest of the runtime. The shared classifiers cover every
case the local list did (billing, quota, insufficient_quota, rate limit,
usage limit) plus more, and are more precise about weak signals.
Update the tests accordingly: the classifier test now uses a realistic
billing error string, and the message_tool_only test asserts the notice is
sent rather than suppressed.1 parent 6beee84 commit 7e0c4ad
2 files changed
Lines changed: 25 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1695 | 1695 | | |
1696 | 1696 | | |
1697 | 1697 | | |
1698 | | - | |
| 1698 | + | |
1699 | 1699 | | |
1700 | 1700 | | |
1701 | 1701 | | |
| |||
1779 | 1779 | | |
1780 | 1780 | | |
1781 | 1781 | | |
1782 | | - | |
1783 | | - | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
1784 | 1786 | | |
1785 | 1787 | | |
1786 | 1788 | | |
| |||
1794 | 1796 | | |
1795 | 1797 | | |
1796 | 1798 | | |
1797 | | - | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
1798 | 1806 | | |
1799 | 1807 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
7 | 12 | | |
8 | 13 | | |
9 | 14 | | |
| |||
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
43 | 52 | | |
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
48 | | - | |
49 | 57 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| |||
382 | 385 | | |
383 | 386 | | |
384 | 387 | | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
| 388 | + | |
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
| |||
0 commit comments