openfang icon indicating copy to clipboard operation
openfang copied to clipboard

Hourly cost quota exceeded prevents agent communication with no warning or reset timer

Open ych411521894 opened this issue 8 months ago • 1 comments

Description

When attempting to send a message to another agent via agent_send, the operation fails with a cost quota error. The agent remains in "Running" state despite being unusable, and there is no indication of when the quota will reset. 当尝试通过 agent_send 向另一代理发送消息时,作会因成本配额错误而失败。代理保持“运行”状态,尽管无法使用,且没有指标显示配额何时会重置。

Expected Behavior

The system should provide a warning before the quota is exhausted (e.g., at 80-90% usage) 系统应在配额用尽前(例如在 80-90%使用率时)提供警告 After quota reset (new hour), the agent should be able to receive messages again 在配额重置(新小时)后,客服应该能再次接收消息 Agent status should change from "Running" to "Quota Exceeded" or similar 代理状态应从“运行中”变为“配额已超额”或类似状态 Display time remaining until quota resets 显示时间剩余,直到配额重置

Steps to Reproduce

Start multiple agents (e.g., predictor-hand, collector-hand, browser-hand) 启动多个代理(例如, 预测手、 收集手 、 浏览器手 ) Engage in conversations that consume token quota over time 参与那些随着时间消耗象征性配额的对话 Attempt to send a message to an agent via agent_send: 尝试通过 agent_send 向代理发送消息: Copyagent_send(agent_id="predictor-hand", message="...") Observe the error: 注意错误: CopyError: Send failed: Resource quota exceeded: Agent 4561fb7d-4d20-4e05-924d-06341fec7c05 exceeded hourly cost quota: $1.0010 / $1.0000

OpenFang Version

0.3.25

Operating System

macOS (Intel)

Logs / Screenshots

Error: Send failed: Resource quota exceeded: Agent 4561fb7d-4d20-4e05-924d-06341fec7c05 exceeded hourly cost quota: $1.0010 / $1.0000

Agent list shows the agent still in "Running" state:

CopyRunning agents (4):

  • predictor-hand (id: 4561fb7d-4d20-4e05-924d-06341fec7c05, state: Running, model: anthropic:glm-5)

ych411521894 avatar Mar 07 '26 15:03 ych411521894

Markdown

Rightpartners avatar Mar 08 '26 02:03 Rightpartners