fix: disclose data storage cost in BYOK copy - #3352
Conversation
Marketing and docs copy claimed BYOK routing is entirely free, but optional full data retention is billed at $0.01 per 1M tokens from credits in all modes, including BYOK. Add the caveat and link the storage-pricing docs section on the pricing FAQ, pricing table, landing FAQ, comparison pages, open-source page, DevPass FAQ, and the provider-keys docs page. Claude-Session: https://claude.ai/code/session_0196L4fULdokeKNu7stvbLWm
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (11)
🚧 Files skipped from review as they are similar to previous changes (9)
WalkthroughThe PR adds a shared ChangesData retention pricing
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
apps/ui/src/components/pricing/pricing-table.tsx (1)
69-72: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse the shared storage-price contract across all pricing copy.
These surfaces embed
$0.01instead of usingMARKETING_STATS.dataStoragePrice. A future price update can leave the pricing table and comparison pages inconsistent with the shared FAQ.
apps/ui/src/components/pricing/pricing-table.tsx#L69-L72: interpolateMARKETING_STATS.dataStoragePriceand use the canonical price format.apps/ui/src/app/compare/open-router/page.tsx#L22-L22: interpolateMARKETING_STATS.dataStoragePrice.apps/ui/src/app/compare/portkey/page.tsx#L22-L22: interpolateMARKETING_STATS.dataStoragePrice.apps/ui/src/app/compare/vercel-ai-gateway/page.tsx#L27-L27: interpolateMARKETING_STATS.dataStoragePrice.As per coding guidelines, apply DRY principles for code reuse.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/ui/src/components/pricing/pricing-table.tsx` around lines 69 - 72, Replace hardcoded storage prices with the shared MARKETING_STATS.dataStoragePrice value using the canonical price format. Update the pricing copy in apps/ui/src/components/pricing/pricing-table.tsx lines 69-72, apps/ui/src/app/compare/open-router/page.tsx line 22, apps/ui/src/app/compare/portkey/page.tsx line 22, and apps/ui/src/app/compare/vercel-ai-gateway/page.tsx line 27, ensuring each file imports and reuses MARKETING_STATS rather than duplicating the price.Source: Coding guidelines
apps/ui/src/app/open-source/page.tsx (1)
60-60: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCentralize the storage price in application FAQs.
These pages hard-code the same price while the repository provides
MARKETING_STATS.dataStoragePrice. Use the shared value to prevent pricing drift.
apps/ui/src/app/open-source/page.tsx#L60-L60: interpolateMARKETING_STATS.dataStoragePrice.apps/ui/src/app/compare/aws-bedrock/page.tsx#L27-L27: interpolateMARKETING_STATS.dataStoragePrice.apps/ui/src/app/compare/azure-ai-foundry/page.tsx#L27-L27: interpolateMARKETING_STATS.dataStoragePrice.apps/ui/src/app/compare/litellm/page.tsx#L27-L27: interpolateMARKETING_STATS.dataStoragePrice.The PR objective identifies
MARKETING_STATS.dataStoragePriceas the shared pricing value.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/ui/src/app/open-source/page.tsx` at line 60, Replace the hard-coded storage price in the FAQ text with the shared MARKETING_STATS.dataStoragePrice value in apps/ui/src/app/open-source/page.tsx:60-60, apps/ui/src/app/compare/aws-bedrock/page.tsx:27-27, apps/ui/src/app/compare/azure-ai-foundry/page.tsx:27-27, and apps/ui/src/app/compare/litellm/page.tsx:27-27, preserving the surrounding wording and interpolation format.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/docs/content/learn/provider-keys.mdx`:
- Line 10: Update the pricing callout near the provider-key guidance, using the
existing text around “only charged the provider's standard rates,” to also
disclose the optional data-retention storage charge. Ensure the wording no
longer implies provider rates are the only possible charge and remains
consistent with the storage-pricing disclosure above.
In `@apps/ui/src/components/landing/faq.tsx`:
- Line 31: Update the FAQ answer in apps/ui/src/components/landing/faq.tsx at
line 31 to separate Credits and BYOK pricing from a statement that full data
retention is billed at MARKETING_STATS.dataStoragePrice for both modes. Apply
the same explicit both-mode wording in apps/code/src/components/Faq.tsx at line
90, replacing the BYOK-only parenthetical.
---
Nitpick comments:
In `@apps/ui/src/app/open-source/page.tsx`:
- Line 60: Replace the hard-coded storage price in the FAQ text with the shared
MARKETING_STATS.dataStoragePrice value in
apps/ui/src/app/open-source/page.tsx:60-60,
apps/ui/src/app/compare/aws-bedrock/page.tsx:27-27,
apps/ui/src/app/compare/azure-ai-foundry/page.tsx:27-27, and
apps/ui/src/app/compare/litellm/page.tsx:27-27, preserving the surrounding
wording and interpolation format.
In `@apps/ui/src/components/pricing/pricing-table.tsx`:
- Around line 69-72: Replace hardcoded storage prices with the shared
MARKETING_STATS.dataStoragePrice value using the canonical price format. Update
the pricing copy in apps/ui/src/components/pricing/pricing-table.tsx lines
69-72, apps/ui/src/app/compare/open-router/page.tsx line 22,
apps/ui/src/app/compare/portkey/page.tsx line 22, and
apps/ui/src/app/compare/vercel-ai-gateway/page.tsx line 27, ensuring each file
imports and reuses MARKETING_STATS rather than duplicating the price.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 0a5b3405-8c19-4e1e-b577-ebf42bd2bfa6
📒 Files selected for processing (13)
apps/code/src/components/Faq.tsxapps/docs/content/learn/provider-keys.mdxapps/ui/src/app/compare/aws-bedrock/page.tsxapps/ui/src/app/compare/azure-ai-foundry/page.tsxapps/ui/src/app/compare/litellm/page.tsxapps/ui/src/app/compare/open-router/page.tsxapps/ui/src/app/compare/portkey/page.tsxapps/ui/src/app/compare/vercel-ai-gateway/page.tsxapps/ui/src/app/open-source/page.tsxapps/ui/src/components/landing/faq.tsxapps/ui/src/components/pricing/pricing-faq.tsxapps/ui/src/components/pricing/pricing-table.tsxpackages/shared/src/marketing.ts
Word the data-retention storage charge as applying in both credits and BYOK modes (landing + DevPass FAQs), fix the provider-keys docs callout that implied provider rates are the only charge, and reuse MARKETING_STATS.dataStoragePrice instead of hardcoded prices on the compare pages, open-source FAQ, and pricing table. Claude-Session: https://claude.ai/code/session_0196L4fULdokeKNu7stvbLWm
Summary
Marketing and docs copy claimed BYOK (bring-your-own-keys) usage is entirely free. That's still true for routing — 0% platform fee — but when an organization enables full data retention, storage is billed at $0.01 per 1M tokens from LLM Gateway credits in all modes, including BYOK (see #3247, which made that billing consistent). This PR adds the caveat everywhere the free-BYOK claim appears and links the storage pricing docs.
Changes
packages/shared: addMARKETING_STATS.dataStoragePrice("$0.01 per 1M tokens") next toplatformFeeas the single source of truth for surfaces that already consumeMARKETING_STATS.apps/ui):pricing-faq.tsx— the "Is there a fee when I bring my own API keys?" answer now explains the optional storage charge and links "See storage pricing" to the docs section (answer is reused verbatim for FAQPage JSON-LD).pricing-table.tsx— the Data Retention row gets a description ("Metadata is free; full payloads are $0.01/1M tokens") and a "See storage pricing →" link.landing/faq.tsx) — the "How much does it cost?" BYOK bullet (both the JSON-LD string and the rendered accordion, kept in sync) now mentions the charge, with the rendered version linking the docs section./compare/open-router,/compare/portkey,/compare/litellm,/compare/vercel-ai-gateway,/compare/aws-bedrock,/compare/azure-ai-foundry, and the/open-sourceFAQ.apps/code/Faq.tsx) — the pay-as-you-go answer gets the same parenthetical.learn/provider-keys.mdx) — the "without additional gateway fees" intro now notes the optional storage charge and links/features/data-retention#storage-pricing.Deliberately unchanged
Testing
pnpm build— 17/17 tasks pass.pnpm format— clean.https://claude.ai/code/session_0196L4fULdokeKNu7stvbLWm
Summary by CodeRabbit
Documentation
Pricing