mirror of
https://github.com/MervinPraison/PraisonAI-Tools.git
synced 2026-11-12 18:47:46 -10:00
NaN/inf prices passed float() but made both per-call and session-spend comparisons evaluate false, bypassing the configured guard and poisoning _session_spend. Fail closed on non-finite/negative prices in _check_budget and validate the response charge in spend recording so a malformed response cannot corrupt cumulative spend. Co-authored-by: Mervin Praison <[email protected]>