Fix default hourly cost quota to unlimited instead of $1.00#392
Open
cryptonahue wants to merge 1 commit intoRightNow-AI:mainfrom
Open
Fix default hourly cost quota to unlimited instead of $1.00#392cryptonahue wants to merge 1 commit intoRightNow-AI:mainfrom
cryptonahue wants to merge 1 commit intoRightNow-AI:mainfrom
Conversation
The default ResourceQuota had max_cost_per_hour_usd set to 1.0, causing agents to hit a $1/hour limit unexpectedly even when no explicit budget was configured. This was inconsistent with max_cost_per_day_usd and max_cost_per_month_usd which already defaulted to 0.0 (unlimited). Changed the default to 0.0 (unlimited) to match the behavior of the other cost fields and to avoid surprising users with hard stops during normal agent usage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ResourceQuota::default()hadmax_cost_per_hour_usdhardcoded to1.0, causing agents to hit an unexpected $1/hour hard stop even when no budget was explicitly configured by the usermax_cost_per_day_usdandmax_cost_per_month_usdalready defaulted to0.0(unlimited) — this PR makesmax_cost_per_hour_usdconsistent with them1.0to0.0(unlimited)Reproduction
donatemplate)Agent error: Resource quota exceeded: ... exceeded hourly cost quota: $1.XXXX / $1.0000$1.0000hourly even with global limits set to unlimitedFix
Test plan
cargo test -p openfang-types— 287 tests passcargo clippy -p openfang-types -- -D warnings— zero warningscargo fmt --all --check— no diff on changed file