feat(billing): per-service and platform-wide free call limits
release / release (release) Canceled after 0s

- mcp_service.free_daily_limit: per service, per user per day (NULL/0 = unlimited)
- sys_config free_global_daily_limit: applies to every free service
- effective limit = smaller of the two, so a service without its own value
  still inherits the global one
- admin: Pricing tab input, System Settings > Business > Free Call Limits
- submission review pages and endpoints (scaffolding, not yet published end to end)
- allow LAN IPs in http_utils, add docker-compose.yml
This commit is contained in:
jinghui committed 2026-11-13 10:20:25 +08:00
1 parent 2fd6272bbd
commit d18adf035b
24 files changed
+720 -24

No files matched your search

@@ -65,6 +65,27 @@ export const PricingTab: React.FC<PricingTabProps> = ({
</SelectItem>
</Select>
{formData.charge_type === ChargeType.Free && (
<Input
type="number"
min="0"
step="1"
value={
formData.free_daily_limit === null ||
formData.free_daily_limit === undefined
? ""
: String(formData.free_daily_limit)
}
onChange={(e) => onInputChange("free_daily_limit", e.target.value)}
description={t(
"Max calls per user per day (Beijing time). Leave blank or 0 for unlimited"
)}
placeholder={t("e.g. 50")}
label={t("Daily call limit per user")}
labelPlacement="outside"
/>
)}
{formData.charge_type !== ChargeType.Free && (
<>
{formData.charge_type === ChargeType.PerToken ? (