🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
chore(in-app-agent)!: LANGFUSE_AI_* replaces LANGFUSE_AWS_BEDROCK_* for the Langfuse AI model (#16558)
Lysander Kiesel3aa3046a39fa
diff --git a/.env.dev.example b/.env.dev.exampleindex 893fb189dc..d91e3efa4a 100644--- a/.env.dev.example+++ b/.env.dev.example@@ -194,26 +194,25 @@ LANGFUSE_AI_FEATURES_PROJECT_ID=7a88fb47-b4e2-43b8-a06c-a5ce950dc53a# LANGFUSE_SSO_DISCOVERY_WHITELISTED_IP_SEGMENTS=127.0.0.0/8# Langfuse AI. Unset LANGFUSE_AI_PROVIDER defaults to Bedrock, including when-# NEXT_PUBLIC_LANGFUSE_CLOUD_REGION is set. Direct Anthropic Messages:-# LANGFUSE_AI_PROVIDER="anthropic"-# LANGFUSE_AI_MODEL="claude-opus-4-8"-# LANGFUSE_AI_SMALL_MODEL="claude-haiku-4-5"-# LANGFUSE_AI_API_KEY="sk-ant-..."-# LANGFUSE_AI_BASE_URL="https://api.anthropic.com"-# Do not set ANTHROPIC_* — Claude Code injects those without /v1 and can 404.+# NEXT_PUBLIC_LANGFUSE_CLOUD_REGION is set.+# LANGFUSE_AI_MODEL / LANGFUSE_AI_SMALL_MODEL / LANGFUSE_AI_AWS_BEDROCK_REGION+# apply to both providers.# Langfuse AI Bedrock credentialsAWS_ACCESS_KEY_ID="A123456789"AWS_SECRET_ACCESS_KEY="SAK123456789"LANGFUSE_LLM_CONNECTION_BEDROCK_API_KEY="1234567890abcdef"-# LANGFUSE_AWS_BEDROCK_REGION is a deprecated alias of-# LANGFUSE_AI_AWS_BEDROCK_REGION. Bedrock model IDs stay on-# LANGFUSE_AWS_BEDROCK_MODEL / LANGFUSE_AWS_BEDROCK_SMALL_MODEL;-# LANGFUSE_AI_MODEL / LANGFUSE_AI_SMALL_MODEL are Anthropic-only.-# LANGFUSE_AI_AWS_BEDROCK_REGION="eu-west-1"-LANGFUSE_AWS_BEDROCK_REGION="eu-west-1"-LANGFUSE_AWS_BEDROCK_MODEL="eu.anthropic.claude-opus-4-8"-LANGFUSE_AWS_BEDROCK_SMALL_MODEL="eu.anthropic.claude-haiku-4-5-20251001-v1:0"+LANGFUSE_AI_AWS_BEDROCK_REGION="eu-west-1"+LANGFUSE_AI_MODEL="eu.anthropic.claude-opus-5"+LANGFUSE_AI_SMALL_MODEL="eu.anthropic.claude-haiku-4-5-20251001-v1:0"+# Direct Anthropic Messages instead: uncomment to override the Bedrock+# model IDs above (last key wins).+# LANGFUSE_AI_PROVIDER="anthropic"+# LANGFUSE_AI_MODEL="claude-opus-5"+# LANGFUSE_AI_SMALL_MODEL="claude-haiku-4-5"+# LANGFUSE_AI_API_KEY="sk-ant-..."+# LANGFUSE_AI_BASE_URL="https://api.anthropic.com"+# Do not set ANTHROPIC_* — Claude Code injects those without /v1 and can 404.LANGFUSE_IN_APP_AGENT_AWS_PROFILE="playground"# Self-hosted Assistant instance switch. Unset or "false" hides Assistant.# Cloud is on unless this is "false".diff --git a/.env.prod.example b/.env.prod.exampleindex df9e0e4588..8051bf8e59 100644--- a/.env.prod.example+++ b/.env.prod.example@@ -275,6 +275,40 @@ LANGFUSE_ENABLE_BLOB_STORAGE_FILE_LOG=true# Valid values: core, io, scores, observations, metrics# LANGFUSE_API_TRACEBYID_DEFAULT_FIELDS=+# Langfuse Assistant (beta). Hidden unless this is true, on web and worker.+# See https://langfuse.com/self-hosting/configuration/langfuse-assistant+# LANGFUSE_IN_APP_AGENT_ENABLED=true++# One instance-wide model for the Assistant and Ask AI, on web and worker.+# Unset LANGFUSE_AI_PROVIDER defaults to bedrock. Bedrock authenticates through+# the AWS credential chain; anthropic requires LANGFUSE_AI_API_KEY.+# LANGFUSE_AI_PROVIDER=bedrock+# LANGFUSE_AI_MODEL=eu.anthropic.claude-opus-5+# LANGFUSE_AI_SMALL_MODEL=eu.anthropic.claude-haiku-4-5-20251001-v1:0+# LANGFUSE_AI_AWS_BEDROCK_REGION=eu-west-1+# LANGFUSE_AI_API_KEY=+# Origin only, the app appends /v1+# LANGFUSE_AI_BASE_URL=https://api.anthropic.com++# Worker that executes Assistant runs. Without the consumer, runs never start.+# The integrity runner reconciles runs abandoned by a crashed worker.+# QUEUE_CONSUMER_IN_APP_AGENT_RUN_QUEUE_IS_ENABLED=true+# LANGFUSE_IN_APP_AGENT_INTEGRITY_RUNNER_ENABLED=true+# LANGFUSE_IN_APP_AGENT_RUN_QUEUE_PROCESSING_CONCURRENCY=5++# Admission ceilings for concurrent Assistant runs, web only+# LANGFUSE_IN_APP_AGENT_MAX_ACTIVE_RUNS_PER_USER=5+# LANGFUSE_IN_APP_AGENT_MAX_ACTIVE_RUNS_PER_ORG=20++# Assistant sandbox for file and code execution tools, worker only. Leave unset+# to run the Assistant with Langfuse tools only. All four are required together.+# LANGFUSE_IN_APP_AGENT_SANDBOX_PROVIDER=lambda-microvm+# LANGFUSE_IN_APP_AGENT_SANDBOX_AWS_LAMBDA_MICROVM_IMAGE_IDENTIFIER=+# LANGFUSE_IN_APP_AGENT_SANDBOX_AWS_LAMBDA_MICROVM_EXECUTION_ROLE_ARN=+# LANGFUSE_IN_APP_AGENT_SANDBOX_AWS_LAMBDA_MICROVM_REGION=+# Without an egress connector, AWS gives the sandbox public internet access+# LANGFUSE_IN_APP_AGENT_SANDBOX_AWS_LAMBDA_MICROVM_EGRESS_NETWORK_CONNECTOR_ARN=+# Comma-separated additional hostnames/origins accepted by the MCP endpoint.# Set to * to disable Host and Origin validation. This is not recommended.# LANGFUSE_MCP_ALLOWED_HOSTS=internal-langfuse.example.com,https://api.example.comdiff --git a/docker-compose.build.yml b/docker-compose.build.ymlindex 0b85bd53df..d4a2848459 100644--- a/docker-compose.build.yml+++ b/docker-compose.build.yml@@ -57,12 +57,6 @@ services:REDIS_TLS_KEY: ${REDIS_TLS_KEY:-/certs/redis.key}# Shared AI features configuration. These apply to AI features that run# in both web and worker.- # LANGFUSE_AWS_BEDROCK_REGION is a deprecated alias of- # LANGFUSE_AI_AWS_BEDROCK_REGION. Bedrock model IDs stay on- # LANGFUSE_AWS_BEDROCK_MODEL / LANGFUSE_AWS_BEDROCK_SMALL_MODEL.- LANGFUSE_AWS_BEDROCK_MODEL: ${LANGFUSE_AWS_BEDROCK_MODEL:-}- LANGFUSE_AWS_BEDROCK_SMALL_MODEL: ${LANGFUSE_AWS_BEDROCK_SMALL_MODEL:-}- LANGFUSE_AWS_BEDROCK_REGION: ${LANGFUSE_AWS_BEDROCK_REGION:-}LANGFUSE_AI_PROVIDER: ${LANGFUSE_AI_PROVIDER:-}LANGFUSE_AI_MODEL: ${LANGFUSE_AI_MODEL:-}LANGFUSE_AI_SMALL_MODEL: ${LANGFUSE_AI_SMALL_MODEL:-}diff --git a/docker-compose.yml b/docker-compose.ymlindex 1aa23a583f..55eafbf73e 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -76,12 +76,6 @@ services:# Shared AI features configuration. These apply to AI features that run# in both web and worker.LANGFUSE_IN_APP_AGENT_ENABLED: ${LANGFUSE_IN_APP_AGENT_ENABLED:-}- # LANGFUSE_AWS_BEDROCK_REGION is a deprecated alias of- # LANGFUSE_AI_AWS_BEDROCK_REGION. Bedrock model IDs stay on- # LANGFUSE_AWS_BEDROCK_MODEL / LANGFUSE_AWS_BEDROCK_SMALL_MODEL.- LANGFUSE_AWS_BEDROCK_MODEL: ${LANGFUSE_AWS_BEDROCK_MODEL:-}- LANGFUSE_AWS_BEDROCK_SMALL_MODEL: ${LANGFUSE_AWS_BEDROCK_SMALL_MODEL:-}- LANGFUSE_AWS_BEDROCK_REGION: ${LANGFUSE_AWS_BEDROCK_REGION:-}LANGFUSE_AI_PROVIDER: ${LANGFUSE_AI_PROVIDER:-}LANGFUSE_AI_MODEL: ${LANGFUSE_AI_MODEL:-}LANGFUSE_AI_SMALL_MODEL: ${LANGFUSE_AI_SMALL_MODEL:-}diff --git a/packages/shared/src/env.ts b/packages/shared/src/env.tsindex d5b75b8cb5..7d83207ada 100644--- a/packages/shared/src/env.ts+++ b/packages/shared/src/env.ts@@ -519,13 +519,9 @@ const EnvSchema = z.object({.positive().default(DEFAULT_LLM_COMPLETION_TIMEOUT_MS), // 2 minutes- // LANGFUSE_AWS_BEDROCK_REGION is a deprecated alias of- // LANGFUSE_AI_AWS_BEDROCK_REGION. Bedrock model IDs stay on- // LANGFUSE_AWS_BEDROCK_MODEL / LANGFUSE_AWS_BEDROCK_SMALL_MODEL;- // LANGFUSE_AI_MODEL / LANGFUSE_AI_SMALL_MODEL are Anthropic-only.- LANGFUSE_AWS_BEDROCK_REGION: z.string().optional(),- LANGFUSE_AWS_BEDROCK_MODEL: z.string().optional(),- LANGFUSE_AWS_BEDROCK_SMALL_MODEL: z.string().optional(),+ // LANGFUSE_AI_MODEL / LANGFUSE_AI_SMALL_MODEL / LANGFUSE_AI_AWS_BEDROCK_REGION+ // apply to both providers. LANGFUSE_AI_API_KEY / LANGFUSE_AI_BASE_URL are+ // Anthropic-only.LANGFUSE_AI_PROVIDER: z.enum(["bedrock", "anthropic"]).optional(),LANGFUSE_AI_MODEL: z.string().optional(),LANGFUSE_AI_SMALL_MODEL: z.string().optional(),diff --git a/packages/shared/src/in-app-agent/server/modelProvider.test.ts b/packages/shared/src/in-app-agent/server/modelProvider.test.tsindex 2061746b3c..b89dff7128 100644--- a/packages/shared/src/in-app-agent/server/modelProvider.test.ts+++ b/packages/shared/src/in-app-agent/server/modelProvider.test.ts@@ -11,9 +11,6 @@ const original = {LANGFUSE_AI_API_KEY: env.LANGFUSE_AI_API_KEY,LANGFUSE_AI_BASE_URL: env.LANGFUSE_AI_BASE_URL,LANGFUSE_AI_AWS_BEDROCK_REGION: env.LANGFUSE_AI_AWS_BEDROCK_REGION,- LANGFUSE_AWS_BEDROCK_MODEL: env.LANGFUSE_AWS_BEDROCK_MODEL,- LANGFUSE_AWS_BEDROCK_SMALL_MODEL: env.LANGFUSE_AWS_BEDROCK_SMALL_MODEL,- LANGFUSE_AWS_BEDROCK_REGION: env.LANGFUSE_AWS_BEDROCK_REGION,NEXT_PUBLIC_LANGFUSE_CLOUD_REGION: env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION,};@@ -22,22 +19,21 @@ afterEach(() => {});describe("getInAppAgentModelConfig", () => {- it("resolves Bedrock from existing env when provider is unset", () => {+ it("resolves Bedrock from LANGFUSE_AI_MODEL and LANGFUSE_AI_SMALL_MODEL", () => {Object.assign(env, {- LANGFUSE_AI_PROVIDER: undefined,+ LANGFUSE_AI_PROVIDER: "bedrock",+ LANGFUSE_AI_MODEL: "eu.anthropic.claude-opus-5",+ LANGFUSE_AI_SMALL_MODEL: "eu.anthropic.claude-haiku-4-5-20251001-v1:0",LANGFUSE_AI_API_KEY: undefined,LANGFUSE_AI_BASE_URL: undefined,- LANGFUSE_AI_AWS_BEDROCK_REGION: undefined,- LANGFUSE_AWS_BEDROCK_MODEL: "eu.anthropic.claude-opus-4-8",- LANGFUSE_AWS_BEDROCK_SMALL_MODEL: "eu.anthropic.claude-haiku-4-5",- LANGFUSE_AWS_BEDROCK_REGION: "eu-west-1",+ LANGFUSE_AI_AWS_BEDROCK_REGION: "eu-west-1",NEXT_PUBLIC_LANGFUSE_CLOUD_REGION: undefined,});expect(getInAppAgentModelConfig()).toEqual({provider: "bedrock",- modelId: "eu.anthropic.claude-opus-4-8",- titleModelId: "eu.anthropic.claude-haiku-4-5",+ modelId: "eu.anthropic.claude-opus-5",+ titleModelId: "eu.anthropic.claude-haiku-4-5-20251001-v1:0",region: "eu-west-1",});});@@ -49,7 +45,6 @@ describe("getInAppAgentModelConfig", () => {LANGFUSE_AI_SMALL_MODEL: "claude-haiku-4-5",LANGFUSE_AI_API_KEY: "sk-ant-test",LANGFUSE_AI_BASE_URL: "https://api.anthropic.com",- LANGFUSE_AWS_BEDROCK_MODEL: "eu.anthropic.claude-opus-4-8",NEXT_PUBLIC_LANGFUSE_CLOUD_REGION: undefined,});@@ -80,7 +75,6 @@ describe("getInAppAgentModelConfig", () => {LANGFUSE_AI_SMALL_MODEL: "claude-haiku-4-5",LANGFUSE_AI_API_KEY: "sk-ant-test",LANGFUSE_AI_BASE_URL: "https://api.anthropic.com",- LANGFUSE_AWS_BEDROCK_MODEL: "eu.anthropic.claude-opus-4-8",NEXT_PUBLIC_LANGFUSE_CLOUD_REGION: "EU",});@@ -98,19 +92,18 @@ describe("getInAppAgentModelConfig", () => {Object.assign(env, {LANGFUSE_AI_PROVIDER: "bedrock",+ LANGFUSE_AI_MODEL: "eu.anthropic.claude-opus-5",+ LANGFUSE_AI_SMALL_MODEL: undefined,LANGFUSE_AI_API_KEY: "sk-ant-test",LANGFUSE_AI_BASE_URL: "https://api.anthropic.com",- LANGFUSE_AWS_BEDROCK_MODEL: "eu.anthropic.claude-opus-4-8",- LANGFUSE_AWS_BEDROCK_SMALL_MODEL: undefined,- LANGFUSE_AWS_BEDROCK_REGION: "eu-west-1",- LANGFUSE_AI_AWS_BEDROCK_REGION: undefined,+ LANGFUSE_AI_AWS_BEDROCK_REGION: "eu-west-1",NEXT_PUBLIC_LANGFUSE_CLOUD_REGION: "EU",});expect(getInAppAgentModelConfig()).toEqual({provider: "bedrock",- modelId: "eu.anthropic.claude-opus-4-8",- titleModelId: "eu.anthropic.claude-opus-4-8",+ modelId: "eu.anthropic.claude-opus-5",+ titleModelId: "eu.anthropic.claude-opus-5",region: "eu-west-1",});expect(warn).toHaveBeenCalledTimes(1);@@ -121,23 +114,36 @@ describe("getInAppAgentModelConfig", () => {warn.mockRestore();});- it("prefers LANGFUSE_AI_AWS_BEDROCK_REGION over LANGFUSE_AWS_BEDROCK_REGION", () => {+ it("treats an invalid LANGFUSE_AI_AWS_BEDROCK_REGION as unconfigured", () => {+ Object.assign(env, {+ LANGFUSE_AI_PROVIDER: "bedrock",+ LANGFUSE_AI_MODEL: "eu.anthropic.claude-opus-5",+ LANGFUSE_AI_SMALL_MODEL: undefined,+ LANGFUSE_AI_API_KEY: undefined,+ LANGFUSE_AI_BASE_URL: undefined,+ LANGFUSE_AI_AWS_BEDROCK_REGION: "us-east-1.attacker.test",+ NEXT_PUBLIC_LANGFUSE_CLOUD_REGION: "EU",+ });++ expect(getInAppAgentModelConfig()).toBeUndefined();+ });++ it("leaves the Bedrock region undefined when LANGFUSE_AI_AWS_BEDROCK_REGION is unset", () => {Object.assign(env, {LANGFUSE_AI_PROVIDER: undefined,+ LANGFUSE_AI_MODEL: "eu.anthropic.claude-opus-5",+ LANGFUSE_AI_SMALL_MODEL: undefined,LANGFUSE_AI_API_KEY: undefined,LANGFUSE_AI_BASE_URL: undefined,- LANGFUSE_AI_AWS_BEDROCK_REGION: "us-east-1",- LANGFUSE_AWS_BEDROCK_MODEL: "eu.anthropic.claude-opus-4-8",- LANGFUSE_AWS_BEDROCK_SMALL_MODEL: undefined,- LANGFUSE_AWS_BEDROCK_REGION: "eu-west-1",+ LANGFUSE_AI_AWS_BEDROCK_REGION: undefined,NEXT_PUBLIC_LANGFUSE_CLOUD_REGION: "EU",});expect(getInAppAgentModelConfig()).toEqual({provider: "bedrock",- modelId: "eu.anthropic.claude-opus-4-8",- titleModelId: "eu.anthropic.claude-opus-4-8",- region: "us-east-1",+ modelId: "eu.anthropic.claude-opus-5",+ titleModelId: "eu.anthropic.claude-opus-5",+ region: undefined,});});});diff --git a/packages/shared/src/in-app-agent/server/modelProvider.ts b/packages/shared/src/in-app-agent/server/modelProvider.tsindex f1cd535c69..fa98e5f010 100644--- a/packages/shared/src/in-app-agent/server/modelProvider.ts+++ b/packages/shared/src/in-app-agent/server/modelProvider.ts@@ -24,7 +24,7 @@ export type InAppAgentModelConfig =};export const LANGFUSE_AI_MODEL_UNCONFIGURED_MESSAGE =- "Langfuse AI model is not configured. Set LANGFUSE_AI_PROVIDER=anthropic with LANGFUSE_AI_MODEL and LANGFUSE_AI_API_KEY, or set LANGFUSE_AWS_BEDROCK_MODEL.";+ "Langfuse AI model is not configured. Set LANGFUSE_AI_MODEL and LANGFUSE_AI_SMALL_MODEL, plus LANGFUSE_AI_API_KEY when LANGFUSE_AI_PROVIDER=anthropic.";/*** Resolves the instance-wide Langfuse-operated AI model (Assistant + Ask AI).@@ -35,8 +35,10 @@ export const LANGFUSE_AI_MODEL_UNCONFIGURED_MESSAGE =* set. Cloud does not override an explicit Anthropic provider.** Region is optional for Bedrock: Cloud web historically omits it and lets- * the AWS SDK use the task region. Prefer LANGFUSE_AI_AWS_BEDROCK_REGION;- * LANGFUSE_AWS_BEDROCK_REGION is the fallback during the Cloud cutover.+ * the AWS SDK use the task region.+ *+ * LANGFUSE_AI_MODEL / LANGFUSE_AI_SMALL_MODEL / LANGFUSE_AI_AWS_BEDROCK_REGION+ * apply to both providers.*/export function getInAppAgentModelConfig(params?: {modelId?: string | null;@@ -58,20 +60,25 @@ export function getInAppAgentModelConfig(params?: {};}- const modelId = params?.modelId ?? env.LANGFUSE_AWS_BEDROCK_MODEL;+ const modelId = params?.modelId ?? env.LANGFUSE_AI_MODEL;const region = getLangfuseAIBedrockRegion();if (!modelId) {return undefined;}+ try {+ assertValidBedrockRegion(region);+ } catch {+ return undefined;+ }+warnIfBedrockIgnoresAnthropicEnv();- assertValidBedrockRegion(region);return {provider: "bedrock",modelId,- titleModelId: env.LANGFUSE_AWS_BEDROCK_SMALL_MODEL ?? modelId,+ titleModelId: env.LANGFUSE_AI_SMALL_MODEL ?? modelId,region,};}diff --git a/packages/shared/src/server/llm/ai-sdk/providers/bedrock.ts b/packages/shared/src/server/llm/ai-sdk/providers/bedrock.tsindex f4b6142d20..8d9d94d171 100644--- a/packages/shared/src/server/llm/ai-sdk/providers/bedrock.ts+++ b/packages/shared/src/server/llm/ai-sdk/providers/bedrock.ts@@ -29,12 +29,11 @@ export function assertValidBedrockRegion(region: string | undefined): void {}/**- * Bedrock region for Langfuse-operated AI (Assistant, Ask AI).- * `LANGFUSE_AI_AWS_BEDROCK_REGION` is preferred; `LANGFUSE_AWS_BEDROCK_REGION`- * remains the fallback until Cloud infra finishes the cutover.+ * Bedrock region for Langfuse-operated AI (Assistant, Ask AI). Undefined lets+ * the AWS SDK fall back to the task region.*/export function getLangfuseAIBedrockRegion(): string | undefined {- return env.LANGFUSE_AI_AWS_BEDROCK_REGION ?? env.LANGFUSE_AWS_BEDROCK_REGION;+ return env.LANGFUSE_AI_AWS_BEDROCK_REGION;}/**diff --git a/web/src/__tests__/server/ai-filter-access.servertest.ts b/web/src/__tests__/server/ai-filter-access.servertest.tsindex 95cf80ac7f..2e5d36ca1d 100644--- a/web/src/__tests__/server/ai-filter-access.servertest.ts+++ b/web/src/__tests__/server/ai-filter-access.servertest.ts@@ -142,24 +142,20 @@ describe("Ask AI filter generation access", () => {it("generates Ask AI on self-hosted and keeps Filter with AI Cloud-only", async () => {const originalCloudRegion = env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION;- const originalBedrockModel = env.LANGFUSE_AWS_BEDROCK_MODEL;- const originalBedrockSmallModel = env.LANGFUSE_AWS_BEDROCK_SMALL_MODEL;- const originalSharedBedrockModel = sharedEnv.LANGFUSE_AWS_BEDROCK_MODEL;+ const originalBedrockModel = env.LANGFUSE_AI_MODEL;+ const originalBedrockSmallModel = env.LANGFUSE_AI_SMALL_MODEL;+ const originalSharedBedrockModel = sharedEnv.LANGFUSE_AI_MODEL;const originalAiFeaturesProjectId =sharedEnv.LANGFUSE_AI_FEATURES_PROJECT_ID;(env as { NEXT_PUBLIC_LANGFUSE_CLOUD_REGION?: string }).NEXT_PUBLIC_LANGFUSE_CLOUD_REGION = undefined;- (- env as { LANGFUSE_AWS_BEDROCK_MODEL?: string }- ).LANGFUSE_AWS_BEDROCK_MODEL = "test-model";- (- env as { LANGFUSE_AWS_BEDROCK_SMALL_MODEL?: string }- ).LANGFUSE_AWS_BEDROCK_SMALL_MODEL = undefined;- (- sharedEnv as { LANGFUSE_AWS_BEDROCK_MODEL?: string }- ).LANGFUSE_AWS_BEDROCK_MODEL = "test-model";+ (env as { LANGFUSE_AI_MODEL?: string }).LANGFUSE_AI_MODEL = "test-model";+ (env as { LANGFUSE_AI_SMALL_MODEL?: string }).LANGFUSE_AI_SMALL_MODEL =+ undefined;+ (sharedEnv as { LANGFUSE_AI_MODEL?: string }).LANGFUSE_AI_MODEL =+ "test-model";(sharedEnv as { LANGFUSE_AI_FEATURES_PROJECT_ID?: string }).LANGFUSE_AI_FEATURES_PROJECT_ID = undefined;@@ -193,15 +189,12 @@ describe("Ask AI filter generation access", () => {(env as { NEXT_PUBLIC_LANGFUSE_CLOUD_REGION?: string }).NEXT_PUBLIC_LANGFUSE_CLOUD_REGION = originalCloudRegion;- (- env as { LANGFUSE_AWS_BEDROCK_MODEL?: string }- ).LANGFUSE_AWS_BEDROCK_MODEL = originalBedrockModel;- (- env as { LANGFUSE_AWS_BEDROCK_SMALL_MODEL?: string }- ).LANGFUSE_AWS_BEDROCK_SMALL_MODEL = originalBedrockSmallModel;- (- sharedEnv as { LANGFUSE_AWS_BEDROCK_MODEL?: string }- ).LANGFUSE_AWS_BEDROCK_MODEL = originalSharedBedrockModel;+ (env as { LANGFUSE_AI_MODEL?: string }).LANGFUSE_AI_MODEL =+ originalBedrockModel;+ (env as { LANGFUSE_AI_SMALL_MODEL?: string }).LANGFUSE_AI_SMALL_MODEL =+ originalBedrockSmallModel;+ (sharedEnv as { LANGFUSE_AI_MODEL?: string }).LANGFUSE_AI_MODEL =+ originalSharedBedrockModel;(sharedEnv as { LANGFUSE_AI_FEATURES_PROJECT_ID?: string }).LANGFUSE_AI_FEATURES_PROJECT_ID = originalAiFeaturesProjectId;diff --git a/web/src/__tests__/server/evaluator-v2-service.servertest.ts b/web/src/__tests__/server/evaluator-v2-service.servertest.tsindex 6030b68cf1..3715e25e64 100644--- a/web/src/__tests__/server/evaluator-v2-service.servertest.ts+++ b/web/src/__tests__/server/evaluator-v2-service.servertest.ts@@ -6,6 +6,7 @@ import {createOrgProjectAndApiKey,} from "@langfuse/shared/src/server";import type * as SharedServer from "@langfuse/shared/src/server";+import { env as sharedEnv } from "@langfuse/shared/src/env";import type * as EnvModule from "@/src/env.mjs";import type * as EvaluatorPreflightModule from "@/src/features/evals/server/evaluator-preflight";import type * as TestEvaluatorModule from "@/src/features/evals/v2/server/evaluators/testEvaluator";@@ -41,13 +42,9 @@ const mocks = vi.hoisted(() => ({testEvaluator: vi.fn(),env: {NEXT_PUBLIC_LANGFUSE_CLOUD_REGION: "EU",- LANGFUSE_AWS_BEDROCK_SMALL_MODEL: "test-small-model",- LANGFUSE_AWS_BEDROCK_MODEL: "test-model",LANGFUSE_MIGRATION_V4_WRITE_MODE: "events_only",} as {NEXT_PUBLIC_LANGFUSE_CLOUD_REGION: string | undefined;- LANGFUSE_AWS_BEDROCK_SMALL_MODEL: string | undefined;- LANGFUSE_AWS_BEDROCK_MODEL: string | undefined;LANGFUSE_MIGRATION_V4_WRITE_MODE: "legacy" | "dual" | "events_only";},}));@@ -63,8 +60,6 @@ vi.mock("@/src/env.mjs", async (importOriginal) => {return {env: Object.assign(mocks.env, actual.env, {NEXT_PUBLIC_LANGFUSE_CLOUD_REGION: "EU",- LANGFUSE_AWS_BEDROCK_SMALL_MODEL: "test-small-model",- LANGFUSE_AWS_BEDROCK_MODEL: "test-model",LANGFUSE_MIGRATION_V4_WRITE_MODE: "events_only",}),};@@ -129,6 +124,27 @@ const llmInput = (const createService = () => new EvaluatorService(prisma, async () => undefined);+// Langfuse AI availability resolves the model through the shared env, so drive+// it there rather than through the web env mock.+const originalSharedAiModel = {+ model: sharedEnv.LANGFUSE_AI_MODEL,+ smallModel: sharedEnv.LANGFUSE_AI_SMALL_MODEL,+ provider: sharedEnv.LANGFUSE_AI_PROVIDER,+ apiKey: sharedEnv.LANGFUSE_AI_API_KEY,+};++const setSharedAiModel = (params: {+ model: string | undefined;+ smallModel: string | undefined;+}) => {+ Object.assign(sharedEnv, {+ LANGFUSE_AI_PROVIDER: undefined,+ LANGFUSE_AI_API_KEY: undefined,+ LANGFUSE_AI_MODEL: params.model,+ LANGFUSE_AI_SMALL_MODEL: params.smallModel,+ });+};+beforeAll(async () => {const [first, second] = await Promise.all([createOrgProjectAndApiKey(),@@ -153,9 +169,8 @@ beforeEach(() => {mocks.getEvaluatorDefinitionPreflightError.mockResolvedValue(null);mocks.testEvaluator.mockReset();mocks.env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION = "EU";- mocks.env.LANGFUSE_AWS_BEDROCK_SMALL_MODEL = "test-small-model";- mocks.env.LANGFUSE_AWS_BEDROCK_MODEL = "test-model";mocks.env.LANGFUSE_MIGRATION_V4_WRITE_MODE = "events_only";+ setSharedAiModel({ model: "test-model", smallModel: "test-small-model" });});afterEach(async () => {@@ -168,6 +183,12 @@ afterEach(async () => {});afterAll(async () => {+ Object.assign(sharedEnv, {+ LANGFUSE_AI_MODEL: originalSharedAiModel.model,+ LANGFUSE_AI_SMALL_MODEL: originalSharedAiModel.smallModel,+ LANGFUSE_AI_PROVIDER: originalSharedAiModel.provider,+ LANGFUSE_AI_API_KEY: originalSharedAiModel.apiKey,+ });await prisma.organization.deleteMany({ where: { id: { in: orgIds } } });});@@ -784,7 +805,7 @@ describe("EvaluatorService", () => {).resolves.toBeNull();mocks.generateLangfuseAIText.mockClear();- mocks.env.LANGFUSE_AWS_BEDROCK_SMALL_MODEL = undefined;+ setSharedAiModel({ model: "test-model", smallModel: undefined });mocks.generateLangfuseAIText.mockResolvedValueOnce("Main model fallback");await expect(service.suggestName({ projectId, userId: null, definition }),@@ -794,13 +815,13 @@ describe("EvaluatorService", () => {);mocks.generateLangfuseAIText.mockClear();- mocks.env.LANGFUSE_AWS_BEDROCK_MODEL = undefined;+ setSharedAiModel({ model: undefined, smallModel: undefined });await expect(service.suggestName({ projectId, userId: null, definition }),).resolves.toBeNull();expect(mocks.generateLangfuseAIText).not.toHaveBeenCalled();- mocks.env.LANGFUSE_AWS_BEDROCK_MODEL = "test-model";+ setSharedAiModel({ model: "test-model", smallModel: undefined });await expect(service.suggestName({projectId: otherProjectId,diff --git a/web/src/__tests__/server/in-app-agent-api-route-auth.servertest.ts b/web/src/__tests__/server/in-app-agent-api-route-auth.servertest.tsindex 531f64c521..d5ed98fb14 100644--- a/web/src/__tests__/server/in-app-agent-api-route-auth.servertest.ts+++ b/web/src/__tests__/server/in-app-agent-api-route-auth.servertest.ts@@ -383,12 +383,12 @@ function createInAppAgentSession(params: {async function withInAppAgentCloudEnv<T>(run: () => Promise<T>): Promise<T> {const originalCloudRegion = env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION;- const originalBedrockModel = env.LANGFUSE_AWS_BEDROCK_MODEL;+ const originalBedrockModel = env.LANGFUSE_AI_MODEL;const originalAiFeaturesPublicKey = env.LANGFUSE_AI_FEATURES_PUBLIC_KEY;const originalAiFeaturesSecretKey = env.LANGFUSE_AI_FEATURES_SECRET_KEY;(env as any).NEXT_PUBLIC_LANGFUSE_CLOUD_REGION = "DEV";- (env as any).LANGFUSE_AWS_BEDROCK_MODEL = "test-model";+ (env as any).LANGFUSE_AI_MODEL = "test-model";(env as any).LANGFUSE_AI_FEATURES_PUBLIC_KEY = "pk-lf-test";(env as any).LANGFUSE_AI_FEATURES_SECRET_KEY = "sk-lf-test";@@ -396,7 +396,7 @@ async function withInAppAgentCloudEnv<T>(run: () => Promise<T>): Promise<T> {return await run();} finally {(env as any).NEXT_PUBLIC_LANGFUSE_CLOUD_REGION = originalCloudRegion;- (env as any).LANGFUSE_AWS_BEDROCK_MODEL = originalBedrockModel;+ (env as any).LANGFUSE_AI_MODEL = originalBedrockModel;(env as any).LANGFUSE_AI_FEATURES_PUBLIC_KEY = originalAiFeaturesPublicKey;(env as any).LANGFUSE_AI_FEATURES_SECRET_KEY = originalAiFeaturesSecretKey;}diff --git a/web/src/__tests__/server/in-app-agent-background-run.servertest.ts b/web/src/__tests__/server/in-app-agent-background-run.servertest.tsindex cb137b9cf6..08018417d8 100644--- a/web/src/__tests__/server/in-app-agent-background-run.servertest.ts+++ b/web/src/__tests__/server/in-app-agent-background-run.servertest.ts@@ -97,12 +97,13 @@ vi.mock("@/src/server/auth", () => ({describe("in-app agent background runs", () => {const originalCloudRegion = env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION;- const originalBedrockModel = env.LANGFUSE_AWS_BEDROCK_MODEL;+ const originalModel = env.LANGFUSE_AI_MODEL;const originalSharedCloudRegion = sharedEnv.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION;- const originalSharedBedrockModel = sharedEnv.LANGFUSE_AWS_BEDROCK_MODEL;- const originalSharedBedrockRegion = sharedEnv.LANGFUSE_AWS_BEDROCK_REGION;- const originalSharedAiBedrockRegion =- sharedEnv.LANGFUSE_AI_AWS_BEDROCK_REGION;+ const originalSharedModel = sharedEnv.LANGFUSE_AI_MODEL;+ const originalSharedSmallModel = sharedEnv.LANGFUSE_AI_SMALL_MODEL;+ const originalSharedProvider = sharedEnv.LANGFUSE_AI_PROVIDER;+ const originalSharedApiKey = sharedEnv.LANGFUSE_AI_API_KEY;+ const originalSharedRegion = sharedEnv.LANGFUSE_AI_AWS_BEDROCK_REGION;const originalSharedInAppAgentEnabled =sharedEnv.LANGFUSE_IN_APP_AGENT_ENABLED;const originalMaxActiveRunsPerUser =@@ -112,11 +113,15 @@ describe("in-app agent background runs", () => {beforeEach(() => {(env as any).NEXT_PUBLIC_LANGFUSE_CLOUD_REGION = "DEV";- (env as any).LANGFUSE_AWS_BEDROCK_MODEL = "test-model";+ (env as any).LANGFUSE_AI_MODEL = "test-model";(sharedEnv as any).NEXT_PUBLIC_LANGFUSE_CLOUD_REGION = "DEV";- (sharedEnv as any).LANGFUSE_AWS_BEDROCK_MODEL = "test-model";- (sharedEnv as any).LANGFUSE_AWS_BEDROCK_REGION = "eu-central-1";- (sharedEnv as any).LANGFUSE_AI_AWS_BEDROCK_REGION = undefined;+ // Pin the provider: a local .env with LANGFUSE_AI_PROVIDER=anthropic would+ // otherwise route these Bedrock cases through the Anthropic branch.+ (sharedEnv as any).LANGFUSE_AI_PROVIDER = undefined;+ (sharedEnv as any).LANGFUSE_AI_API_KEY = undefined;+ (sharedEnv as any).LANGFUSE_AI_MODEL = "test-model";+ (sharedEnv as any).LANGFUSE_AI_SMALL_MODEL = undefined;+ (sharedEnv as any).LANGFUSE_AI_AWS_BEDROCK_REGION = "eu-central-1";(sharedEnv as any).LANGFUSE_IN_APP_AGENT_ENABLED = undefined;enqueuedJobs.length = 0;enqueueShouldFail = false;@@ -130,14 +135,14 @@ describe("in-app agent background runs", () => {afterEach(() => {vi.useRealTimers();(env as any).NEXT_PUBLIC_LANGFUSE_CLOUD_REGION = originalCloudRegion;- (env as any).LANGFUSE_AWS_BEDROCK_MODEL = originalBedrockModel;+ (env as any).LANGFUSE_AI_MODEL = originalModel;(sharedEnv as any).NEXT_PUBLIC_LANGFUSE_CLOUD_REGION =originalSharedCloudRegion;- (sharedEnv as any).LANGFUSE_AWS_BEDROCK_MODEL = originalSharedBedrockModel;- (sharedEnv as any).LANGFUSE_AWS_BEDROCK_REGION =- originalSharedBedrockRegion;- (sharedEnv as any).LANGFUSE_AI_AWS_BEDROCK_REGION =- originalSharedAiBedrockRegion;+ (sharedEnv as any).LANGFUSE_AI_MODEL = originalSharedModel;+ (sharedEnv as any).LANGFUSE_AI_SMALL_MODEL = originalSharedSmallModel;+ (sharedEnv as any).LANGFUSE_AI_PROVIDER = originalSharedProvider;+ (sharedEnv as any).LANGFUSE_AI_API_KEY = originalSharedApiKey;+ (sharedEnv as any).LANGFUSE_AI_AWS_BEDROCK_REGION = originalSharedRegion;(sharedEnv as any).LANGFUSE_IN_APP_AGENT_ENABLED =originalSharedInAppAgentEnabled;(env as any).LANGFUSE_IN_APP_AGENT_MAX_ACTIVE_RUNS_PER_USER =@@ -284,8 +289,8 @@ describe("in-app agent background runs", () => {it("lists conversations when the in-app agent model is not configured", async () => {const { caller, projectId, userId } = await createCaller();const conversation = await createConversation({ projectId, userId });- (sharedEnv as any).LANGFUSE_AWS_BEDROCK_MODEL = undefined;- (sharedEnv as any).LANGFUSE_AWS_BEDROCK_REGION = undefined;+ (sharedEnv as any).LANGFUSE_AI_MODEL = undefined;+ (sharedEnv as any).LANGFUSE_AI_AWS_BEDROCK_REGION = undefined;const listed = await caller.listConversations({ projectId, limit: 50 });@@ -294,10 +299,9 @@ describe("in-app agent background runs", () => {]);});- it("starts a Cloud run when LANGFUSE_AWS_BEDROCK_REGION is unset", async () => {+ it("starts a Cloud run when LANGFUSE_AI_AWS_BEDROCK_REGION is unset", async () => {const { caller, projectId, userId } = await createCaller();const conversation = await createConversation({ projectId, userId });- (sharedEnv as any).LANGFUSE_AWS_BEDROCK_REGION = undefined;(sharedEnv as any).LANGFUSE_AI_AWS_BEDROCK_REGION = undefined;await expect(@@ -314,8 +318,8 @@ describe("in-app agent background runs", () => {it("rejects requests before queueing when the in-app agent model is not configured", async () => {const { caller, projectId } = await createCaller();- (sharedEnv as any).LANGFUSE_AWS_BEDROCK_MODEL = undefined;- (sharedEnv as any).LANGFUSE_AWS_BEDROCK_REGION = undefined;+ (sharedEnv as any).LANGFUSE_AI_MODEL = undefined;+ (sharedEnv as any).LANGFUSE_AI_AWS_BEDROCK_REGION = undefined;await expect(caller.startRun({diff --git a/web/src/__tests__/server/in-app-agent-persistence.servertest.ts b/web/src/__tests__/server/in-app-agent-persistence.servertest.tsindex 56bd2430ab..adb0b520c9 100644--- a/web/src/__tests__/server/in-app-agent-persistence.servertest.ts+++ b/web/src/__tests__/server/in-app-agent-persistence.servertest.ts@@ -556,7 +556,7 @@ describe("in-app agent persistence", () => {});it("does not overwrite user-renamed conversation titles", async () => {- const originalBedrockSmallModel = env.LANGFUSE_AWS_BEDROCK_SMALL_MODEL;+ const originalBedrockSmallModel = env.LANGFUSE_AI_SMALL_MODEL;const { caller, projectId, userId } = await createCaller();const conversation = await createConversation({ projectId, userId });@@ -567,7 +567,7 @@ describe("in-app agent persistence", () => {});try {- (env as any).LANGFUSE_AWS_BEDROCK_SMALL_MODEL = "small-title-model";+ (env as any).LANGFUSE_AI_SMALL_MODEL = "small-title-model";await maybeInferAndPersistConversationTitle({prisma,@@ -588,12 +588,12 @@ describe("in-app agent persistence", () => {});expect(mockGenerateLLMText).not.toHaveBeenCalled();} finally {- (env as any).LANGFUSE_AWS_BEDROCK_SMALL_MODEL = originalBedrockSmallModel;+ (env as any).LANGFUSE_AI_SMALL_MODEL = originalBedrockSmallModel;}});it("keeps the default title when title generation fails", async () => {- const originalBedrockSmallModel = env.LANGFUSE_AWS_BEDROCK_SMALL_MODEL;+ const originalBedrockSmallModel = env.LANGFUSE_AI_SMALL_MODEL;const { projectId, userId } = await createCaller();const conversation = await createConversation({ projectId, userId });const originalTitle = conversation.title;@@ -611,7 +611,7 @@ describe("in-app agent persistence", () => {});try {- (env as any).LANGFUSE_AWS_BEDROCK_SMALL_MODEL = "small-title-model";+ (env as any).LANGFUSE_AI_SMALL_MODEL = "small-title-model";mockGenerateLLMText.mockRejectedValue(new Error("Bedrock failed"));await expect(@@ -631,7 +631,7 @@ describe("in-app agent persistence", () => {}),).resolves.toEqual({ title: originalTitle });} finally {- (env as any).LANGFUSE_AWS_BEDROCK_SMALL_MODEL = originalBedrockSmallModel;+ (env as any).LANGFUSE_AI_SMALL_MODEL = originalBedrockSmallModel;}});diff --git a/web/src/env.mjs b/web/src/env.mjsindex 8fde9ea4de..3226b0d64c 100644--- a/web/src/env.mjs+++ b/web/src/env.mjs@@ -460,12 +460,9 @@ export const env = createEnv({SLACK_CLIENT_SECRET: z.string().optional(),SLACK_STATE_SECRET: z.string().optional(),- // LANGFUSE_AWS_BEDROCK_REGION is a deprecated alias of- // LANGFUSE_AI_AWS_BEDROCK_REGION. Bedrock model IDs stay on- // LANGFUSE_AWS_BEDROCK_MODEL / LANGFUSE_AWS_BEDROCK_SMALL_MODEL;- // LANGFUSE_AI_MODEL / LANGFUSE_AI_SMALL_MODEL are Anthropic-only.- LANGFUSE_AWS_BEDROCK_MODEL: z.string().optional(),- LANGFUSE_AWS_BEDROCK_SMALL_MODEL: z.string().optional(),+ // LANGFUSE_AI_MODEL / LANGFUSE_AI_SMALL_MODEL / LANGFUSE_AI_AWS_BEDROCK_REGION+ // apply to both providers. LANGFUSE_AI_API_KEY / LANGFUSE_AI_BASE_URL are+ // Anthropic-only.LANGFUSE_AI_PROVIDER: z.enum(["bedrock", "anthropic"]).optional(),LANGFUSE_AI_MODEL: z.string().optional(),LANGFUSE_AI_SMALL_MODEL: z.string().optional(),@@ -577,8 +574,6 @@ export const env = createEnv({}),AWS_ACCESS_KEY_ID: z.string().optional(),AWS_SECRET_ACCESS_KEY: z.string().optional(),- // Deprecated. Fallback for LANGFUSE_AI_AWS_BEDROCK_REGION; remove after cutover.- LANGFUSE_AWS_BEDROCK_REGION: z.string().optional(),LANGFUSE_IN_APP_AGENT_MAX_ACTIVE_RUNS_PER_USER: z.coerce.number().int()@@ -669,7 +664,6 @@ export const env = createEnv({process.env.LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES,AWS_ACCESS_KEY_ID: process.env.AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY: process.env.AWS_SECRET_ACCESS_KEY,- LANGFUSE_AWS_BEDROCK_REGION: process.env.LANGFUSE_AWS_BEDROCK_REGION,LANGFUSE_IN_APP_AGENT_MAX_ACTIVE_RUNS_PER_USER:process.env.LANGFUSE_IN_APP_AGENT_MAX_ACTIVE_RUNS_PER_USER,LANGFUSE_IN_APP_AGENT_MAX_ACTIVE_RUNS_PER_ORG:@@ -1002,12 +996,6 @@ export const env = createEnv({SLACK_CLIENT_SECRET: process.env.SLACK_CLIENT_SECRET,SLACK_STATE_SECRET: process.env.SLACK_STATE_SECRET,- // LANGFUSE_AWS_BEDROCK_REGION is a deprecated alias of- // LANGFUSE_AI_AWS_BEDROCK_REGION. Bedrock model IDs stay on- // LANGFUSE_AWS_BEDROCK_MODEL / LANGFUSE_AWS_BEDROCK_SMALL_MODEL.- LANGFUSE_AWS_BEDROCK_MODEL: process.env.LANGFUSE_AWS_BEDROCK_MODEL,- LANGFUSE_AWS_BEDROCK_SMALL_MODEL:- process.env.LANGFUSE_AWS_BEDROCK_SMALL_MODEL,LANGFUSE_AI_PROVIDER: process.env.LANGFUSE_AI_PROVIDER,LANGFUSE_AI_MODEL: process.env.LANGFUSE_AI_MODEL,LANGFUSE_AI_SMALL_MODEL: process.env.LANGFUSE_AI_SMALL_MODEL,diff --git a/web/src/features/ai-features/server/availability.ts b/web/src/features/ai-features/server/availability.tsindex 344fdba097..98dd3efe49 100644--- a/web/src/features/ai-features/server/availability.ts+++ b/web/src/features/ai-features/server/availability.ts@@ -1,4 +1,5 @@import type { PrismaClient } from "@langfuse/shared/src/db";+import { getInAppAgentModelConfig } from "@langfuse/shared/in-app-agent/server/modelProvider";import { env } from "@/src/env.mjs";type LangfuseAiFeatureUnavailableReason =@@ -39,13 +40,14 @@ export async function resolveLangfuseAiFeatureAvailability(params: {return { available: false, reason: "organization-disabled" };}- const model =- env.LANGFUSE_AWS_BEDROCK_SMALL_MODEL ?? env.LANGFUSE_AWS_BEDROCK_MODEL;- if (!model) return { available: false, reason: "model-not-configured" };+ // Same resolution as the Assistant and Ask AI: the small model, whichever+ // provider is configured.+ const modelConfig = getInAppAgentModelConfig();+ if (!modelConfig) return { available: false, reason: "model-not-configured" };return {available: true,- model,+ model: modelConfig.titleModelId,aiTelemetryEnabled: project.organization.aiTelemetryEnabled,};}diff --git a/worker/src/features/in-app-agent/executeInAppAgentRun.test.ts b/worker/src/features/in-app-agent/executeInAppAgentRun.test.tsindex c4c19599a1..d56b9830bc 100644--- a/worker/src/features/in-app-agent/executeInAppAgentRun.test.ts+++ b/worker/src/features/in-app-agent/executeInAppAgentRun.test.ts@@ -19,8 +19,8 @@ vi.hoisted(() => {delete process.env.LANGFUSE_IN_APP_AGENT_SANDBOX_PROVIDER;process.env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION ??= "DEV";process.env.NEXTAUTH_URL ??= "http://localhost:3000";- process.env.LANGFUSE_AWS_BEDROCK_REGION ??= "eu-central-1";- process.env.LANGFUSE_AWS_BEDROCK_MODEL ??= "test-bedrock-model";+ process.env.LANGFUSE_AI_AWS_BEDROCK_REGION ??= "eu-central-1";+ process.env.LANGFUSE_AI_MODEL ??= "test-bedrock-model";});/**@@ -1055,12 +1055,12 @@ describe("executeInAppAgentRun", () => {expect(await getInAppAgentApiKeys(projectId)).toHaveLength(0);});- it("claims a run when LANGFUSE_AWS_BEDROCK_REGION is unset", async () => {- const originalRegion = sharedEnv.LANGFUSE_AWS_BEDROCK_REGION;+ it("claims a run when LANGFUSE_AI_AWS_BEDROCK_REGION is unset", async () => {+ const originalRegion = sharedEnv.LANGFUSE_AI_AWS_BEDROCK_REGION;const originalAiRegion = sharedEnv.LANGFUSE_AI_AWS_BEDROCK_REGION;(- sharedEnv as { LANGFUSE_AWS_BEDROCK_REGION?: string }- ).LANGFUSE_AWS_BEDROCK_REGION = undefined;+ sharedEnv as { LANGFUSE_AI_AWS_BEDROCK_REGION?: string }+ ).LANGFUSE_AI_AWS_BEDROCK_REGION = undefined;(sharedEnv as { LANGFUSE_AI_AWS_BEDROCK_REGION?: string }).LANGFUSE_AI_AWS_BEDROCK_REGION = undefined;@@ -1075,8 +1075,8 @@ describe("executeInAppAgentRun", () => {expect(finished.status).toBe("SUCCEEDED");} finally {(- sharedEnv as { LANGFUSE_AWS_BEDROCK_REGION?: string }- ).LANGFUSE_AWS_BEDROCK_REGION = originalRegion;+ sharedEnv as { LANGFUSE_AI_AWS_BEDROCK_REGION?: string }+ ).LANGFUSE_AI_AWS_BEDROCK_REGION = originalRegion;(sharedEnv as { LANGFUSE_AI_AWS_BEDROCK_REGION?: string }).LANGFUSE_AI_AWS_BEDROCK_REGION = originalAiRegion;