Skip to content

An AI-powered search engine with a generative UI

refactor: Use OLLAMA_BASE_URL check instead of NEXT_RUNTIME

Yoshiki Miura5f5366baf1ec
diff --git a/instrumentation.ts b/instrumentation.ts
index b0d73538..a13833da 100644
--- a/instrumentation.ts
+++ b/instrumentation.ts
@@ -7,8 +7,8 @@ export async function register() {
traceExporter: new LangfuseExporter()
})
- // Initialize Ollama validation on server startup (Node.js only)
- if (process.env.NEXT_RUNTIME === 'nodejs') {
+ // Initialize Ollama validation on server startup (only when configured)
+ if (process.env.OLLAMA_BASE_URL) {
const { initializeOllamaValidation } = await import(
'@/lib/config/ollama-validator'
)