-
Notifications
You must be signed in to change notification settings - Fork 3.2k
improvement(byok): make available for all plans #2782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |||||
|
|
||||||
| import { useState } from 'react' | ||||||
| import { createLogger } from '@sim/logger' | ||||||
| import { Crown, Eye, EyeOff } from 'lucide-react' | ||||||
| import { Eye, EyeOff } from 'lucide-react' | ||||||
| import { useParams } from 'next/navigation' | ||||||
| import { | ||||||
| Button, | ||||||
|
|
@@ -83,7 +83,6 @@ export function BYOK() { | |||||
|
|
||||||
| const { data, isLoading } = useBYOKKeys(workspaceId) | ||||||
| const keys = data?.keys ?? [] | ||||||
| const byokEnabled = data?.byokEnabled ?? true | ||||||
| const upsertKey = useUpsertBYOKKey() | ||||||
| const deleteKey = useDeleteBYOKKey() | ||||||
|
|
||||||
|
|
@@ -98,31 +97,6 @@ export function BYOK() { | |||||
| return keys.find((k) => k.providerId === providerId) | ||||||
| } | ||||||
|
|
||||||
| // Show enterprise-only gate if BYOK is not enabled | ||||||
| if (!isLoading && !byokEnabled) { | ||||||
| return ( | ||||||
| <div className='flex h-full flex-col items-center justify-center gap-[16px] py-[32px]'> | ||||||
| <div className='flex h-[48px] w-[48px] items-center justify-center rounded-full bg-[var(--surface-6)]'> | ||||||
| <Crown className='h-[24px] w-[24px] text-[var(--amber-9)]' /> | ||||||
| </div> | ||||||
| <div className='flex flex-col items-center gap-[8px] text-center'> | ||||||
| <h3 className='font-medium text-[15px] text-[var(--text-primary)]'>Enterprise Feature</h3> | ||||||
| <p className='max-w-[320px] text-[13px] text-[var(--text-secondary)]'> | ||||||
| Bring Your Own Key (BYOK) is available exclusively on the Enterprise plan. Upgrade to | ||||||
| use your own API keys and eliminate the 2x cost multiplier. | ||||||
| </p> | ||||||
| </div> | ||||||
| <Button | ||||||
| variant='primary' | ||||||
| className='!bg-[var(--brand-tertiary-2)] !text-[var(--text-inverse)] hover:!bg-[var(--brand-tertiary-2)]/90' | ||||||
| onClick={() => window.open('https://sim.ai/enterprise', '_blank')} | ||||||
| > | ||||||
| Contact Sales | ||||||
| </Button> | ||||||
| </div> | ||||||
| ) | ||||||
| } | ||||||
|
|
||||||
| const handleSave = async () => { | ||||||
| if (!editingProvider || !apiKeyInput.trim()) return | ||||||
|
|
||||||
|
|
@@ -340,7 +314,7 @@ export function BYOK() { | |||||
| <span className='font-medium text-[var(--text-primary)]'> | ||||||
| {PROVIDERS.find((p) => p.id === deleteConfirmProvider)?.name} | ||||||
| </span>{' '} | ||||||
| API key? This workspace will revert to using platform keys with the 2x multiplier. | ||||||
| API key? This workspace will revert to using platform hosted keys. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The text "platform hosted keys" is unclear. Consider being more explicit about what happens when BYOK is removed, especially since the cost implications have changed with this PR. Previously, it mentioned "2x multiplier" (which was actually 1.4x based on the docs), but now BYOK is available to everyone. The message should clarify what "platform hosted keys" means in terms of cost. Suggested improvement:
Suggested change
This matches the documentation at Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! Prompt To Fix With AIThis is a comment left during a code review.
Path: apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/byok/byok.tsx
Line: 317:317
Comment:
The text "platform hosted keys" is unclear. Consider being more explicit about what happens when BYOK is removed, especially since the cost implications have changed with this PR.
Previously, it mentioned "2x multiplier" (which was actually 1.4x based on the docs), but now BYOK is available to everyone. The message should clarify what "platform hosted keys" means in terms of cost.
Suggested improvement:
```suggestion
API key? This workspace will revert to using Sim Studio's hosted keys with the 1.4x pricing multiplier.
```
This matches the documentation at `apps/docs/content/docs/en/execution/costs.mdx` line 51 and 84 which explicitly states the 1.4x multiplier.
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise. |
||||||
| </p> | ||||||
| </ModalBody> | ||||||
| <ModalFooter> | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The BYOK section was removed from the English enterprise docs, but the same section still exists in other language versions (German, Spanish, French, Japanese, and Chinese). These need to be updated for consistency.
The BYOK section should be removed from:
apps/docs/content/docs/de/enterprise/index.mdxapps/docs/content/docs/es/enterprise/index.mdxapps/docs/content/docs/fr/enterprise/index.mdxapps/docs/content/docs/ja/enterprise/index.mdxapps/docs/content/docs/zh/enterprise/index.mdxAnd potentially added to the corresponding
costs.mdxfiles in those languages (though I note those files may not exist yet based on the execution/costs.mdx files I saw).Prompt To Fix With AI