diff --git a/app/billing/tier_manager.py b/app/billing/tier_manager.py index 5e3f93f..ed5f3de 100644 --- a/app/billing/tier_manager.py +++ b/app/billing/tier_manager.py @@ -81,16 +81,18 @@ class TierManager: async def get_tier(self, user_id: str, db: AsyncSession) -> BillingTier: """Return the current billing tier for ``user_id`` from the DB. - Falls back to ``'free'`` when no subscription row exists. + Falls back to ``'power'`` in dev (unlimited) or ``'free'`` in prod + when no subscription row exists. """ from app.models import Subscription # noqa: PLC0415 + from app.config.settings import settings # noqa: PLC0415 result = await db.execute( select(Subscription.tier).where(Subscription.user_id == user_id) ) tier: str | None = result.scalar_one_or_none() if tier is None or tier not in FEATURES: - return "free" + return "power" if settings.ENV == "dev" else "free" return tier # type: ignore[return-value] # ── Feature access ───────────────────────────────────────────────────