From 216b6d9a0fe6fe0bfed2a3c04a4cdbeb467a2b99 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2026 09:53:01 +0000 Subject: [PATCH] fix(assessments): Fix LangGraph install, OpenRouter model names, and Mastra setup Allow @langchain/core 1.x for JS LangGraph so npm can satisfy @langchain/langgraph 1.7's ^1.3.4 peer range. Expect the provider-qualified model names that OpenRouter returns (anthropic/claude-haiku-4.5, openai/gpt-5-nano) in response model overrides. Drop the @mastra/sentry exporter. Sentry v11 instruments Mastra by default, and the second exporter re-inits Sentry and crashed the Next.js run. Co-Authored-By: Ognjen Bostjancic --- .../templates/agents/cloudflare/langgraph/config.json | 4 ++-- src/runner/templates/agents/nextjs/mastra/config.json | 4 ---- src/runner/templates/agents/node/langgraph/config.json | 4 ++-- src/runner/templates/agents/node/mastra/config.json | 4 ---- src/runner/templates/agents/python/langgraph/config.json | 2 +- src/runner/templates/agents/python/pydantic-ai/config.json | 2 +- src/runner/templates/llm/cloudflare/anthropic/config.json | 2 +- src/runner/templates/llm/cloudflare/langchain/config.json | 2 +- src/runner/templates/llm/nextjs/anthropic/config.json | 2 +- src/runner/templates/llm/nextjs/langchain/config.json | 2 +- src/runner/templates/llm/node/anthropic/config.json | 2 +- src/runner/templates/llm/node/langchain/config.json | 2 +- src/runner/templates/llm/python/anthropic/config.json | 2 +- src/runner/templates/llm/python/langchain/config.json | 2 +- src/runner/templates/llm/python/litellm/config.json | 2 +- src/runner/templates/shared/agents/mastra.assessment.njk | 6 +----- 16 files changed, 16 insertions(+), 28 deletions(-) diff --git a/src/runner/templates/agents/cloudflare/langgraph/config.json b/src/runner/templates/agents/cloudflare/langgraph/config.json index b89ee46..80b0e62 100644 --- a/src/runner/templates/agents/cloudflare/langgraph/config.json +++ b/src/runner/templates/agents/cloudflare/langgraph/config.json @@ -16,7 +16,7 @@ }, { "package": "@langchain/core", - "version": "1.2.9" + "version": "1" }, { "package": "zod", @@ -33,7 +33,7 @@ "overrides": { "modelOverrides": { "request": "claude-haiku-4-5", - "response": "claude-haiku-4-5*" + "response": "anthropic/claude-haiku-4.5*" } } } diff --git a/src/runner/templates/agents/nextjs/mastra/config.json b/src/runner/templates/agents/nextjs/mastra/config.json index 305e8dd..7811260 100644 --- a/src/runner/templates/agents/nextjs/mastra/config.json +++ b/src/runner/templates/agents/nextjs/mastra/config.json @@ -6,10 +6,6 @@ "package": "@mastra/core", "version": "framework" }, - { - "package": "@mastra/sentry", - "version": "1.2.13" - }, { "package": "@mastra/observability", "version": "1.17.3" diff --git a/src/runner/templates/agents/node/langgraph/config.json b/src/runner/templates/agents/node/langgraph/config.json index f4f9a05..fd5b307 100644 --- a/src/runner/templates/agents/node/langgraph/config.json +++ b/src/runner/templates/agents/node/langgraph/config.json @@ -16,7 +16,7 @@ }, { "package": "@langchain/core", - "version": "1.2.9" + "version": "1" }, { "package": "zod", @@ -33,7 +33,7 @@ "overrides": { "modelOverrides": { "request": "claude-haiku-4-5", - "response": "claude-haiku-4-5*" + "response": "anthropic/claude-haiku-4.5*" } } } diff --git a/src/runner/templates/agents/node/mastra/config.json b/src/runner/templates/agents/node/mastra/config.json index 4fd7f79..8d54dee 100644 --- a/src/runner/templates/agents/node/mastra/config.json +++ b/src/runner/templates/agents/node/mastra/config.json @@ -6,10 +6,6 @@ "package": "@mastra/core", "version": "framework" }, - { - "package": "@mastra/sentry", - "version": "1.2.13" - }, { "package": "@mastra/observability", "version": "1.17.3" diff --git a/src/runner/templates/agents/python/langgraph/config.json b/src/runner/templates/agents/python/langgraph/config.json index fa0c79c..13d7e88 100644 --- a/src/runner/templates/agents/python/langgraph/config.json +++ b/src/runner/templates/agents/python/langgraph/config.json @@ -26,7 +26,7 @@ "overrides": { "modelOverrides": { "request": "claude-haiku-4-5", - "response": "claude-haiku-4-5*" + "response": "anthropic/claude-haiku-4.5*" } } } diff --git a/src/runner/templates/agents/python/pydantic-ai/config.json b/src/runner/templates/agents/python/pydantic-ai/config.json index e8726f5..df64cc6 100644 --- a/src/runner/templates/agents/python/pydantic-ai/config.json +++ b/src/runner/templates/agents/python/pydantic-ai/config.json @@ -20,7 +20,7 @@ "overrides": { "modelOverrides": { "request": "fallback:gpt-4o-mini-bad-model-name,gpt-5-nano", - "response": "gpt-5-nano*" + "response": "openai/gpt-5-nano*" } } } diff --git a/src/runner/templates/llm/cloudflare/anthropic/config.json b/src/runner/templates/llm/cloudflare/anthropic/config.json index 0a425ca..cedca8b 100644 --- a/src/runner/templates/llm/cloudflare/anthropic/config.json +++ b/src/runner/templates/llm/cloudflare/anthropic/config.json @@ -12,6 +12,6 @@ "sentryVersions": ["11"], "modelOverrides": { "request": "claude-haiku-4-5", - "response": "claude-haiku-4-5*" + "response": "anthropic/claude-haiku-4.5*" } } diff --git a/src/runner/templates/llm/cloudflare/langchain/config.json b/src/runner/templates/llm/cloudflare/langchain/config.json index 1c010e7..11c60f1 100644 --- a/src/runner/templates/llm/cloudflare/langchain/config.json +++ b/src/runner/templates/llm/cloudflare/langchain/config.json @@ -30,7 +30,7 @@ "overrides": { "modelOverrides": { "request": "claude-haiku-4-5", - "response": "claude-haiku-4-5*" + "response": "anthropic/claude-haiku-4.5*" } } } diff --git a/src/runner/templates/llm/nextjs/anthropic/config.json b/src/runner/templates/llm/nextjs/anthropic/config.json index 0756428..ca776dd 100644 --- a/src/runner/templates/llm/nextjs/anthropic/config.json +++ b/src/runner/templates/llm/nextjs/anthropic/config.json @@ -20,6 +20,6 @@ "sentryVersions": ["11"], "modelOverrides": { "request": "claude-haiku-4-5", - "response": "claude-haiku-4-5*" + "response": "anthropic/claude-haiku-4.5*" } } diff --git a/src/runner/templates/llm/nextjs/langchain/config.json b/src/runner/templates/llm/nextjs/langchain/config.json index 21a4ef0..72f4ea6 100644 --- a/src/runner/templates/llm/nextjs/langchain/config.json +++ b/src/runner/templates/llm/nextjs/langchain/config.json @@ -34,7 +34,7 @@ "overrides": { "modelOverrides": { "request": "claude-haiku-4-5", - "response": "claude-haiku-4-5*" + "response": "anthropic/claude-haiku-4.5*" } } } diff --git a/src/runner/templates/llm/node/anthropic/config.json b/src/runner/templates/llm/node/anthropic/config.json index bd09fd1..1964420 100644 --- a/src/runner/templates/llm/node/anthropic/config.json +++ b/src/runner/templates/llm/node/anthropic/config.json @@ -12,6 +12,6 @@ "sentryVersions": ["11"], "modelOverrides": { "request": "claude-haiku-4-5", - "response": "claude-haiku-4-5*" + "response": "anthropic/claude-haiku-4.5*" } } diff --git a/src/runner/templates/llm/node/langchain/config.json b/src/runner/templates/llm/node/langchain/config.json index 5001ba9..51cd4b0 100644 --- a/src/runner/templates/llm/node/langchain/config.json +++ b/src/runner/templates/llm/node/langchain/config.json @@ -30,7 +30,7 @@ "overrides": { "modelOverrides": { "request": "claude-haiku-4-5", - "response": "claude-haiku-4-5*" + "response": "anthropic/claude-haiku-4.5*" } } } diff --git a/src/runner/templates/llm/python/anthropic/config.json b/src/runner/templates/llm/python/anthropic/config.json index 77039a3..7653a77 100644 --- a/src/runner/templates/llm/python/anthropic/config.json +++ b/src/runner/templates/llm/python/anthropic/config.json @@ -17,6 +17,6 @@ "sentryVersions": ["latest"], "modelOverrides": { "request": "claude-haiku-4-5", - "response": "claude-haiku-4-5*" + "response": "anthropic/claude-haiku-4.5*" } } diff --git a/src/runner/templates/llm/python/langchain/config.json b/src/runner/templates/llm/python/langchain/config.json index 383a128..f65a127 100644 --- a/src/runner/templates/llm/python/langchain/config.json +++ b/src/runner/templates/llm/python/langchain/config.json @@ -31,7 +31,7 @@ "overrides": { "modelOverrides": { "request": "claude-haiku-4-5", - "response": "claude-haiku-4-5*" + "response": "anthropic/claude-haiku-4.5*" } } } diff --git a/src/runner/templates/llm/python/litellm/config.json b/src/runner/templates/llm/python/litellm/config.json index 2c5527a..fa3b256 100644 --- a/src/runner/templates/llm/python/litellm/config.json +++ b/src/runner/templates/llm/python/litellm/config.json @@ -24,7 +24,7 @@ "overrides": { "modelOverrides": { "request": "claude-haiku-4-5", - "response": "claude-haiku-4-5*" + "response": "anthropic/claude-haiku-4.5*" } } } diff --git a/src/runner/templates/shared/agents/mastra.assessment.njk b/src/runner/templates/shared/agents/mastra.assessment.njk index 1c7415c..fefcd17 100644 --- a/src/runner/templates/shared/agents/mastra.assessment.njk +++ b/src/runner/templates/shared/agents/mastra.assessment.njk @@ -3,13 +3,9 @@ {% block dynamic_imports %} const { Agent } = await import("@mastra/core/agent"); const { Mastra } = await import("@mastra/core"); -const { Observability } = await import("@mastra/observability"); -const { SentryExporter } = await import("@mastra/sentry"); const { createTool } = await import("@mastra/core/tools"); const { z } = await import("zod"); -const mastra = new Mastra({ - observability: new Observability({ configs: { sentry: { serviceName: "assessment-mastra", exporters: [new SentryExporter({ dsn: process.env.SENTRY_DSN, tracesSampleRate: 1.0 })] } } }), -}); +const mastra = new Mastra(); let agentRegistrationIndex = 0; {% endblock %}