Files
AgentCompany/src
ZacharyZhang-NY db3cd3c8b8 fix(budget): add Fireworks model pricing and auto-unpause after limit increase
Three fixes for the non-functional budget system:

1. Fireworks models hardcoded cost {input: 0, output: 0}, making all
   Fireworks/Fire Pass runs report $0 and budget enforcement useless.
   Added per-model pricing to FIREWORKS_CURATED_MODELS with a fallback
   for unknown models. Pi-ai known providers (Anthropic, OpenAI, etc.)
   already had correct per-model pricing via getModels().

2. saveAgent IPC handler passed the form's submitted status through
   without checking whether the agent was budget-paused and the new
   budget exceeds spent. Now auto-resolves paused → idle when the user
   raises budget_monthly_usd above spent_monthly_usd.

3. checkAutoResolve in budget-enforcement-service resolved policy
   incidents but never touched agents.status. Added
   unpauseBudgetBlockedAgents() that scans for paused agents whose
   legacy budget now has headroom and flips them to idle.
2026-04-29 20:31:48 -04:00
..