Ask HN:你们是如何控制 LLM 调用成本并执行限制的?
2 分•作者: 8dazo•4 个月前
我最近在使用 LLM/agent 系统时遇到了一个问题,意外的循环或重复调用会迅速增加成本。
我见过的大多数工具都侧重于可观测性(日志、追踪、仪表盘),而不是在运行时进行实际的强制执行。
好奇大家在生产环境中是如何处理这个问题的:
* 你们是强制执行硬性限制(预算、速率等),还是仅仅进行监控?
* 你们是在应用层处理这个问题,还是通过一些中间件/代理?
* 你们有为此构建内部解决方案吗?
感觉这还是一个未解决的问题,尤其是在 agent 方面。
很想听听其他人是如何应对这个问题的。
查看原文
I’ve been running into an issue with LLM/agent systems where unexpected loops or repeated calls can quickly drive up costs.<p>Most tools I’ve seen focus on observability (logs, traces, dashboards), but not actual enforcement at runtime.<p>Curious how people here are handling this in production:<p>- Are you enforcing hard limits (budget, rate, etc.) or just monitoring?<p>- Do you handle this at the app level or via some middleware/proxy?<p>- Have you built something in-house for this?<p>Feels like an unsolved problem, especially with agents.<p>Would love to hear how others are dealing with it.