From b5df58d3e0165334cdf64d3124232066f75305a7 Mon Sep 17 00:00:00 2001 From: Ben Bachem <10088265+bezbac@users.noreply.github.com> Date: Wed, 5 Aug 2026 13:11:27 +0200 Subject: [PATCH] Use `LANGFUSE_BASE_URL` over `LANGFUSE_BASEURL` --- README.md | 2 +- src/index.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7aef87d..f15c0ce 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ You can also set credentials with environment variables: ```bash export LANGFUSE_PUBLIC_KEY="pk-lf-..." export LANGFUSE_SECRET_KEY="sk-lf-..." -export LANGFUSE_BASEURL="https://cloud.langfuse.com" +export LANGFUSE_BASE_URL="https://cloud.langfuse.com" export LANGFUSE_ENVIRONMENT="development" export LANGFUSE_USER_ID="your-user-id" ``` diff --git a/src/index.ts b/src/index.ts index d840940..1f57922 100644 --- a/src/index.ts +++ b/src/index.ts @@ -100,7 +100,8 @@ const loadLangfuseCredentials = Effect.gen(function* () { return { publicKey, secretKey, - baseUrl: process.env.LANGFUSE_BASEURL, + // Prefer the canonical name while retaining the legacy name for semver compatibility. + baseUrl: process.env.LANGFUSE_BASE_URL ?? process.env.LANGFUSE_BASEURL, environment: process.env.LANGFUSE_ENVIRONMENT, userId: process.env.LANGFUSE_USER_ID, } satisfies LangfuseCredentials; @@ -281,6 +282,8 @@ const main = Effect.gen(function* () { const baseUrl = credentials.baseUrl ?? + // Prefer the canonical name while retaining the legacy name for semver compatibility. + process.env.LANGFUSE_BASE_URL ?? process.env.LANGFUSE_BASEURL ?? "https://cloud.langfuse.com";