Skip to content

Commit 3fc8b7b

Browse files
authored
fix(studio): fallback to env variable to detect ai feature (#3713)
1 parent 408dc2e commit 3fc8b7b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils/studio.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export function resolveStudioCollection(
3030
): void {
3131
/* @ts-expect-error - studio is not typed */
3232
const studioAIConfig: StudioAIConfig = nuxt.options.studio?.ai || {}
33-
if (!studioAIConfig.apiKey) {
33+
const apiKey = studioAIConfig.apiKey || process.env.AI_GATEWAY_API_KEY
34+
if (!apiKey) {
3435
return
3536
}
3637

0 commit comments

Comments
 (0)