AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(backend): Set the minimum auto top-up amount to 500 credits (#9418)
Zamil Majdy9151211d2aec
diff --git a/autogpt_platform/backend/backend/server/routers/v1.py b/autogpt_platform/backend/backend/server/routers/v1.pyindex 992569f76b..1d1aaf3869 100644--- a/autogpt_platform/backend/backend/server/routers/v1.py+++ b/autogpt_platform/backend/backend/server/routers/v1.py@@ -177,6 +177,8 @@ async def configure_user_auto_top_up() -> str:if request.threshold < 0:raise ValueError("Threshold must be greater than 0")+ if request.amount < 500:+ raise ValueError("Amount must be greater than or equal to 500")if request.amount < request.threshold:raise ValueError("Amount must be greater than or equal to threshold")diff --git a/autogpt_platform/frontend/src/app/marketplace/(user)/credits/page.tsx b/autogpt_platform/frontend/src/app/marketplace/(user)/credits/page.tsxindex 5bdc579dc9..6cec264037 100644--- a/autogpt_platform/frontend/src/app/marketplace/(user)/credits/page.tsx+++ b/autogpt_platform/frontend/src/app/marketplace/(user)/credits/page.tsx@@ -108,7 +108,7 @@ export default function CreditsPage() {htmlFor="topUpAmount"className="mb-1 block text-neutral-700">- Top-up Amount (Credits)+ Top-up Amount (Credits, Minimum 500 = 5 USD)</label><inputtype="number"@@ -137,7 +137,7 @@ export default function CreditsPage() {htmlFor="autoTopUpAmount"className="mb-1 block text-neutral-700">- Auto Top-up Amount (Credits)+ Auto Top-up Amount (Credits, Minimum 500 = 5 USD)</label><inputtype="number"@@ -145,6 +145,7 @@ export default function CreditsPage() {name="topUpAmount"defaultValue={autoTopUpConfig?.amount || ""}placeholder="Enter auto top-up amount"+ min="500"step="100"className="w-full rounded-md border border-slate-200 px-4 py-2 dark:border-slate-700 dark:bg-slate-800"required@@ -164,6 +165,7 @@ export default function CreditsPage() {name="threshold"defaultValue={autoTopUpConfig?.threshold || ""}placeholder="Enter threshold value"+ min="500"step="100"className="w-full rounded-md border border-slate-200 px-4 py-2 dark:border-slate-700 dark:bg-slate-800"required