diff --git a/apps/web/src/app/(private)/evaluations/(evaluation)/[evaluationUuid]/editor/layout.tsx b/apps/web/src/app/(private)/evaluations/(evaluation)/[evaluationUuid]/editor/layout.tsx
index b44a9edf6..9b7ffd004 100644
--- a/apps/web/src/app/(private)/evaluations/(evaluation)/[evaluationUuid]/editor/layout.tsx
+++ b/apps/web/src/app/(private)/evaluations/(evaluation)/[evaluationUuid]/editor/layout.tsx
@@ -8,6 +8,7 @@ import {
import { NAV_LINKS } from '$/app/(private)/_lib/constants'
import BreadcrumbLink from '$/components/BreadcrumbLink'
import { AppLayout } from '$/components/layouts'
+import providerApiKeyPresenter from '$/presenters/providerApiKeyPresenter'
import { getCurrentUser } from '$/services/auth/getCurrentUser'
import { ROUTES } from '$/services/routes'
@@ -49,7 +50,7 @@ export default async function DocumentPage({
diff --git a/apps/web/src/app/(private)/projects/[projectId]/versions/[commitUuid]/documents/[documentUuid]/evaluations/[evaluationId]/layout.tsx b/apps/web/src/app/(private)/projects/[projectId]/versions/[commitUuid]/documents/[documentUuid]/evaluations/[evaluationId]/layout.tsx
index fb27be43c..33dc37f6f 100644
--- a/apps/web/src/app/(private)/projects/[projectId]/versions/[commitUuid]/documents/[documentUuid]/evaluations/[evaluationId]/layout.tsx
+++ b/apps/web/src/app/(private)/projects/[projectId]/versions/[commitUuid]/documents/[documentUuid]/evaluations/[evaluationId]/layout.tsx
@@ -122,7 +122,12 @@ export default async function ConnectedEvaluationLayout({
metadata.config.provider &&
typeof metadata.config.provider === 'string'
) {
- provider = await getProviderApiKeyCached(metadata.config.provider)
+ try {
+ provider = await getProviderApiKeyCached(metadata.config.provider)
+ } catch (error) {
+ // do nothing, it could be that the provider name does not match any
+ // provider in the workspace
+ }
}
}
return (
diff --git a/apps/web/src/app/(private)/projects/[projectId]/versions/[commitUuid]/documents/[documentUuid]/page.tsx b/apps/web/src/app/(private)/projects/[projectId]/versions/[commitUuid]/documents/[documentUuid]/page.tsx
index 01737b44f..2743bb394 100644
--- a/apps/web/src/app/(private)/projects/[projectId]/versions/[commitUuid]/documents/[documentUuid]/page.tsx
+++ b/apps/web/src/app/(private)/projects/[projectId]/versions/[commitUuid]/documents/[documentUuid]/page.tsx
@@ -6,6 +6,7 @@ import {
getDocumentsAtCommitCached,
getProviderApiKeysCached,
} from '$/app/(private)/_data-access'
+import providerApiKeyPresenter from '$/presenters/providerApiKeyPresenter'
import DocumentEditor from './_components/DocumentEditor/Editor'
@@ -31,7 +32,7 @@ export default async function DocumentPage({
addMessagesAction={addMessagesAction}
documents={documents}
document={document}
- providerApiKeys={providerApiKeys}
+ providerApiKeys={providerApiKeys.map(providerApiKeyPresenter)}
/>
)
}