Reddit r/SideProject· /u/Wise_Choice7014·· 3 天前AI 评分42
我做了个 Node.js AI 应用的本地「花钱刹车」:调用还没发出就先拦下
I built a local "spend brake" for Node.js AI apps. It blocks calls before they cost you money.
AI 导读
开发者发布 MIT 许可的 Node.js 库 AI CostGuard,在受支持的 AI SDK 方法执行前估算成本,超出预算或策略上限就直接拦截调用,全程在进程内运行,无需 dashboard 或代理。它只守护你配置的 SDK 方法,不拦截所有 HTTP 请求;估算基于一份带日期的价格快照,不会与账单完全一致;预算按进程计算,跨进程需 Redis 方案,且不能替代服务商侧的支出上限。
来源:Reddit r/SideProject · reddit.com