Skip to content

Pricing V5: AI feature gating & cloud account tracking in CLI #2055

@simple-agent-manager

Description

@simple-agent-manager

Context

Part of the Pricing V5 implementation. Source: strategy/pricing-implementation-checklist.md §4.4, §4.7, §4.8.

AI Feature Gating (§4.4)

Files: src/pkg/cli/generate.go:23-34, src/cmd/cli/command/debug.go:1-64

  • Add client-side tier check for AI commands:
    • Starter: allow limited compose generation (show remaining quota), block or limit debugging
    • If at limit: "You've used your compose generations this month. Upgrade to Pro ($49/mo) for unlimited AI."
    • If debugging blocked: "AI debugging requires a Pro subscription ($49/mo)"
  • Update defang generate help text to mention limits (Starter: limited, Pro: unlimited)
  • Update defang debug help text to mention Pro requirement
  • Note: defang generate is being deprecated in favor of compose-only generation (separate effort)

CanIUse Client (§4.7)

File: src/pkg/cli/client/caniuse.go:12-55

  • Handle new CanIUseResponse fields (if added): allowed_modes, portal_access_level, ai_enabled, max_cloud_accounts/current_cloud_accounts

Cloud Account Tracking (§4.8)

CLI does NOT block deployments based on cloud account registration. Cloud accounts auto-register in Portal after deployment.

  • Ensure provider_account_id is sent to Fabric on deployment (PutStack in stacks.go:30-53 doesn't include it — must add AccountInfo.AccountID)
  • Show informational warning when deploying to a new account: "This deployment uses cloud account X. You currently have N accounts (limit: M). Additional accounts are billed at $29/mo."
  • Add ErrCloudAccountLimit handling if Fabric enforces hard limits

Error Messages & Cost Estimation (§4.3, §4.6)

Files: src/pkg/cli/client/byoc/baseclient.go:41-85, src/pkg/cli/estimate.go:97-116

  • Update GPU/scaling error messages: "GPU access requires a Pro subscription ($49/mo)"
  • Update mode descriptions with pricing context: AFFORDABLE "(Available on all tiers)", BALANCED "(Requires Pro — $49/mo)", HA "(Requires Enterprise — $499/mo)"

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

Labels

pricingv5Pricing V5 implementation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions