Skip to content

Commit 3d1c6cf

Browse files
authored
Skip BYOK provider when not known (#3596)
1 parent 7bd2114 commit 3d1c6cf

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

apps/web/src/lib/notifications.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,22 @@ async function generateByokProvidersNotification(
273273
zai: 'GLM Coding Plan',
274274
} as Record<string, string>;
275275

276+
const providerName = names[provider];
277+
if (!providerName) {
278+
console.debug(
279+
`[generateByokProvidersNotification] unknown BYOK supported provider ${provider}`
280+
);
281+
return [];
282+
}
283+
276284
console.debug(
277285
`[generateByokProvidersNotification] has used BYOK supported provider ${provider}`
278286
);
279287
return [
280288
{
281289
id: 'byok-providers-jan-19',
282290
title: 'Try BYOK for Kilo Gateway',
283-
message: `BYOK now supported for your ${names[provider]}, allowing faster model support, Kilo platform features, and more!`,
291+
message: `BYOK now supported for your ${providerName}, allowing faster model support, Kilo platform features, and more!`,
284292
action: {
285293
actionText: 'Learn more',
286294
actionURL: 'https://kilo.ai/docs/basic-usage/byok',

0 commit comments

Comments
 (0)