Skip to content

Commit a3b19de

Browse files
committed
feat(byok): let workspaces store the Z.ai and Cohere keys the runtime reads
Both ids were already in the BYOK contract enum and both are resolved at execution time — getApiKeyWithBYOK reaches 'zai' (GLM models are in the hosted catalog, so the BYOK branch runs), and 'cohere' backs both the Embeddings block and Knowledge Base reranking — but neither appeared in the settings list, so there was no way to store the key either path looks for. Cohere had no icon; add one from the official multi-color mark so it stays legible on a light and a dark page. Cohere's embed-v4.0 is kbEligible:false, so the description says 'Embeddings and Knowledge Base reranking' rather than claiming KB embeddings.
1 parent 69865cd commit a3b19de

4 files changed

Lines changed: 68 additions & 0 deletions

File tree

apps/docs/components/icons.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5129,6 +5129,30 @@ export function BasetenIcon(props: SVGProps<SVGSVGElement>) {
51295129
)
51305130
}
51315131

5132+
export function CohereIcon(props: SVGProps<SVGSVGElement>) {
5133+
return (
5134+
<svg {...props} height='1em' width='1em' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
5135+
<title>Cohere</title>
5136+
<path
5137+
d='M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z'
5138+
clipRule='evenodd'
5139+
fill='#39594D'
5140+
fillRule='evenodd'
5141+
/>
5142+
<path
5143+
d='M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z'
5144+
clipRule='evenodd'
5145+
fill='#D18EE2'
5146+
fillRule='evenodd'
5147+
/>
5148+
<path
5149+
d='M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z'
5150+
fill='#FF7759'
5151+
/>
5152+
</svg>
5153+
)
5154+
}
5155+
51325156
export function MondayIcon(props: SVGProps<SVGSVGElement>) {
51335157
return (
51345158
<svg

apps/docs/content/docs/en/platform/costs.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ The BYOK settings page groups providers the same way.
225225
| Anthropic | LLM calls |
226226
| Google | LLM calls |
227227
| Mistral | LLM calls and Knowledge Base OCR |
228+
| Z.ai | LLM calls |
229+
| Cohere | Embeddings and Knowledge Base reranking |
228230
| xAI | LLM calls |
229231
| Kimi | LLM calls |
230232
| Fireworks | LLM calls |

apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
AnthropicIcon,
99
BasetenIcon,
1010
BrandfetchIcon,
11+
CohereIcon,
1112
ContextDevIcon,
1213
DatagmaIcon,
1314
DropcontactIcon,
@@ -38,6 +39,7 @@ import {
3839
TogetherIcon,
3940
WizaIcon,
4041
xAIIcon,
42+
ZaiIcon,
4143
ZeroBounceIcon,
4244
} from '@/components/icons'
4345
import { canMutateWorkspaceSettingsSection } from '@/components/settings/navigation'
@@ -97,6 +99,20 @@ const PROVIDERS: (BYOKManagerProvider & { id: BYOKProviderId })[] = [
9799
description: 'LLM calls and Knowledge Base OCR',
98100
placeholder: 'Enter your API key',
99101
},
102+
{
103+
id: 'zai',
104+
name: 'Z.ai',
105+
icon: ZaiIcon,
106+
description: 'LLM calls',
107+
placeholder: 'Enter your Z.ai API key',
108+
},
109+
{
110+
id: 'cohere',
111+
name: 'Cohere',
112+
icon: CohereIcon,
113+
description: 'Embeddings and Knowledge Base reranking',
114+
placeholder: 'Enter your Cohere API key',
115+
},
100116
{
101117
id: 'xai',
102118
name: 'xAI',
@@ -322,6 +338,8 @@ const PROVIDER_SECTIONS: BYOKProviderSection[] = [
322338
'anthropic',
323339
'google',
324340
'mistral',
341+
'zai',
342+
'cohere',
325343
'xai',
326344
'kimi',
327345
'fireworks',

apps/sim/components/icons.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5129,6 +5129,30 @@ export function BasetenIcon(props: SVGProps<SVGSVGElement>) {
51295129
)
51305130
}
51315131

5132+
export function CohereIcon(props: SVGProps<SVGSVGElement>) {
5133+
return (
5134+
<svg {...props} height='1em' width='1em' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'>
5135+
<title>Cohere</title>
5136+
<path
5137+
d='M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z'
5138+
clipRule='evenodd'
5139+
fill='#39594D'
5140+
fillRule='evenodd'
5141+
/>
5142+
<path
5143+
d='M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z'
5144+
clipRule='evenodd'
5145+
fill='#D18EE2'
5146+
fillRule='evenodd'
5147+
/>
5148+
<path
5149+
d='M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z'
5150+
fill='#FF7759'
5151+
/>
5152+
</svg>
5153+
)
5154+
}
5155+
51325156
export function MondayIcon(props: SVGProps<SVGSVGElement>) {
51335157
return (
51345158
<svg

0 commit comments

Comments
 (0)