feat: add llm_query_builder tier gate (paid+) to tiers.py and SessionFeatures
This commit is contained in:
parent
7720f1def5
commit
93f989c821
3 changed files with 13 additions and 0 deletions
|
|
@ -69,6 +69,7 @@ class SessionFeatures:
|
||||||
photo_analysis: bool
|
photo_analysis: bool
|
||||||
shared_scammer_db: bool
|
shared_scammer_db: bool
|
||||||
shared_image_db: bool
|
shared_image_db: bool
|
||||||
|
llm_query_builder: bool
|
||||||
|
|
||||||
|
|
||||||
def compute_features(tier: str) -> SessionFeatures:
|
def compute_features(tier: str) -> SessionFeatures:
|
||||||
|
|
@ -85,6 +86,7 @@ def compute_features(tier: str) -> SessionFeatures:
|
||||||
photo_analysis=paid_plus,
|
photo_analysis=paid_plus,
|
||||||
shared_scammer_db=paid_plus,
|
shared_scammer_db=paid_plus,
|
||||||
shared_image_db=paid_plus,
|
shared_image_db=paid_plus,
|
||||||
|
llm_query_builder=paid_plus,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ FEATURES: dict[str, str] = {
|
||||||
"reverse_image_search": "paid",
|
"reverse_image_search": "paid",
|
||||||
"ebay_oauth": "paid", # full trust scores via eBay Trading API
|
"ebay_oauth": "paid", # full trust scores via eBay Trading API
|
||||||
"background_monitoring": "paid", # limited at Paid; see LIMITS below
|
"background_monitoring": "paid", # limited at Paid; see LIMITS below
|
||||||
|
"llm_query_builder": "paid", # inline natural-language → filter translator
|
||||||
|
|
||||||
# Premium tier
|
# Premium tier
|
||||||
"auto_bidding": "premium",
|
"auto_bidding": "premium",
|
||||||
|
|
|
||||||
|
|
@ -22,3 +22,13 @@ def test_saved_searches_are_free():
|
||||||
# Ungated: retention feature — friction cost outweighs gate value (see tiers.py)
|
# Ungated: retention feature — friction cost outweighs gate value (see tiers.py)
|
||||||
assert can_use("saved_searches", tier="free") is True
|
assert can_use("saved_searches", tier="free") is True
|
||||||
assert can_use("saved_searches", tier="paid") is True
|
assert can_use("saved_searches", tier="paid") is True
|
||||||
|
|
||||||
|
|
||||||
|
def test_llm_query_builder_is_paid():
|
||||||
|
assert can_use("llm_query_builder", tier="free") is False
|
||||||
|
assert can_use("llm_query_builder", tier="paid") is True
|
||||||
|
|
||||||
|
|
||||||
|
def test_llm_query_builder_local_vision_does_not_unlock():
|
||||||
|
# local vision unlocks photo features only, not LLM query builder
|
||||||
|
assert can_use("llm_query_builder", tier="free", has_local_vision=True) is False
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue