Skip to content

fix(billing): hold Mothership fal video and audio generation to paid payers - #10525

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/mothership-fal-paid-gate
Nov 30, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/mothership-fal-paid-gate

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Mothership's generate_video and generate_audio server tools always call fal on Sim's hosted key, but never consulted the hosted-key paid-plan gate, so free-plan payers could run hosted fal video/audio from chat
  • Both tools now check mayUseHostedKey before any work and return the standard HostedKeyRequiresPaidPlanError message (no BYOK option, since these tools have no BYOK path), matching how web search refuses free payers
  • Trials, paid plans, and self-hosted deployments are unaffected (the gate already passes them)

Type of Change

  • Bug fix

Testing

  • lib/billing/free-plan.integration.ts against real Postgres/Redis: free payer refused before fal is reached, paid payer reaches fal, for both tools (19/19 green)
  • Red proof: with the gate reverted, both free-payer tests fail
  • biome on changed files; type-check, audits and full suites in CI

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 30, 2026 10:30pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Adds the shared hosted-key check to Mothership audio and video generation before either tool reads files or calls fal.

  • Mothership’s audio and video tools check paid access before using Sim’s hosted fal key.

Reviews (1) · Last reviewed commit: "fix(billing): hold Mothership fal video ..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 7afd34d into staging Nov 30, 2026
83 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/mothership-fal-paid-gate branch November 30, 2026 22:39

This branch was previously deployed

1 inactive deployment
Preview — 9be31afb Deployed Nov 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant