feat(tiers): gate LLM calls at Free tier; route Paid+ through public cf-orch #140

Open
opened 2026-05-17 09:21:49 -07:00 by pyr0ball · 0 comments
Owner

Request

Tier gate the LLM-dependent recipe features:

Feature Free Paid+
Recipe scan (vision + structuring) Blocked — show BYOK prompt cf-orch public coordinator
L4 recipe generation Blocked — show BYOK prompt cf-orch public coordinator
Expiry LLM fallback Blocked or local-only cf-orch public coordinator

Free users should see a clear "Bring Your Own Key" upsell when they hit an LLM-gated feature — not a silent error.

Paid+ users route through CF_ORCH_URL pointing at the public cf-orch coordinator (orch.circuitforge.tech), which manages GPU allocation across the hosted fleet. This is distinct from the local rack coordinator (10.1.10.71:7700) used in dev.

Implementation notes

  • app/tiers.py already has can_use() and require_tier() — extend with a can_use_llm() check
  • _call_vision_backend() in recipe_scanner.py: Free tier should skip the cf-orch path and raise a BYOK-specific error that the endpoint surfaces as a friendly message
  • LLMRouter in cf-core already gates on DEMO_MODE — a similar FREE_TIER_MODE env var may be the cleanest toggle
  • Cloud compose: CF_ORCH_URL should point to https://orch.circuitforge.tech for Paid+ users (currently points to local rack)

References

  • app/tiers.py
  • app/services/recipe/recipe_scanner.py_call_vision_backend()
  • app/api/endpoints/recipe_scan.py — error surfacing
  • circuitforge_core/llm/router.pyDEMO_MODE gate as reference pattern
## Request Tier gate the LLM-dependent recipe features: | Feature | Free | Paid+ | |---------|------|-------| | Recipe scan (vision + structuring) | Blocked — show BYOK prompt | cf-orch public coordinator | | L4 recipe generation | Blocked — show BYOK prompt | cf-orch public coordinator | | Expiry LLM fallback | Blocked or local-only | cf-orch public coordinator | **Free users** should see a clear "Bring Your Own Key" upsell when they hit an LLM-gated feature — not a silent error. **Paid+ users** route through `CF_ORCH_URL` pointing at the public cf-orch coordinator (`orch.circuitforge.tech`), which manages GPU allocation across the hosted fleet. This is distinct from the local rack coordinator (`10.1.10.71:7700`) used in dev. ## Implementation notes - `app/tiers.py` already has `can_use()` and `require_tier()` — extend with a `can_use_llm()` check - `_call_vision_backend()` in `recipe_scanner.py`: Free tier should skip the cf-orch path and raise a BYOK-specific error that the endpoint surfaces as a friendly message - `LLMRouter` in cf-core already gates on `DEMO_MODE` — a similar `FREE_TIER_MODE` env var may be the cleanest toggle - Cloud compose: `CF_ORCH_URL` should point to `https://orch.circuitforge.tech` for Paid+ users (currently points to local rack) ## References - `app/tiers.py` - `app/services/recipe/recipe_scanner.py` — `_call_vision_backend()` - `app/api/endpoints/recipe_scan.py` — error surfacing - `circuitforge_core/llm/router.py` — `DEMO_MODE` gate as reference pattern
pyr0ball added the
enhancement
label 2026-06-01 12:11:31 -07:00
pyr0ball added this to the Post-Launch milestone 2026-06-01 12:11:31 -07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/kiwi#140
No description provided.