From 9f03fbc31e1bc7972be12772e7992e720e678e92 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 28 Apr 2026 11:03:21 +0300 Subject: [PATCH 1/3] try bedrock without prefix --- src/mastra/agents/skills/skills-matching-agent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mastra/agents/skills/skills-matching-agent.ts b/src/mastra/agents/skills/skills-matching-agent.ts index fb35bd3..c3bc30f 100644 --- a/src/mastra/agents/skills/skills-matching-agent.ts +++ b/src/mastra/agents/skills/skills-matching-agent.ts @@ -4,7 +4,7 @@ import { bedrock } from '../../../utils'; import { PostgresStore } from '@mastra/pg'; import { instanceScorers } from '../../scorers/instance-scorers'; -const MODEL_ID = 'us.anthropic.claude-haiku-4-5-20251001-v1:0'; +const MODEL_ID = 'anthropic.claude-haiku-4-5-20251001-v1:0'; export const skillsMatchingAgent = new Agent({ id: 'skillsMatchingAgent', From 51b2d1cf2e71a3ab1e49d5ebf422da60cd0cbe2e Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 28 Apr 2026 11:11:19 +0300 Subject: [PATCH 2/3] revert us --- src/mastra/agents/skills/skills-matching-agent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mastra/agents/skills/skills-matching-agent.ts b/src/mastra/agents/skills/skills-matching-agent.ts index c3bc30f..fb35bd3 100644 --- a/src/mastra/agents/skills/skills-matching-agent.ts +++ b/src/mastra/agents/skills/skills-matching-agent.ts @@ -4,7 +4,7 @@ import { bedrock } from '../../../utils'; import { PostgresStore } from '@mastra/pg'; import { instanceScorers } from '../../scorers/instance-scorers'; -const MODEL_ID = 'anthropic.claude-haiku-4-5-20251001-v1:0'; +const MODEL_ID = 'us.anthropic.claude-haiku-4-5-20251001-v1:0'; export const skillsMatchingAgent = new Agent({ id: 'skillsMatchingAgent', From 468cdeaf5677efb3f4890f56dcdd605c7705fb64 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Wed, 29 Apr 2026 10:55:19 +0300 Subject: [PATCH 3/3] Fix structured nullable outputs --- .../challenge/challenge-context-workflow.ts | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/mastra/workflows/challenge/challenge-context-workflow.ts b/src/mastra/workflows/challenge/challenge-context-workflow.ts index 8e05e35..11513b7 100644 --- a/src/mastra/workflows/challenge/challenge-context-workflow.ts +++ b/src/mastra/workflows/challenge/challenge-context-workflow.ts @@ -48,18 +48,18 @@ const reviewerInfoSchema = z.object({ const runtimeEnvironmentSchema = z.object({ os: z.string().describe('Expected target operating system (e.g. "Linux", "Windows", "macOS", "any", "unknown")'), containerized: z.boolean().describe('Whether the challenge expects the solution to run inside a container (Docker, Podman, etc.)'), - containerTool: z.string().optional().describe('Expected container tool if containerized (e.g. "Docker", "Docker Compose", "Podman", "Kubernetes")'), - dockerfileExpected: z.boolean().optional().describe('Whether the challenge expects a Dockerfile / docker-compose file to be included in the submission'), + containerTool: z.string().nullable().optional().describe('Expected container tool if containerized (e.g. "Docker", "Docker Compose", "Podman", "Kubernetes")'), + dockerfileExpected: z.boolean().nullable().optional().describe('Whether the challenge expects a Dockerfile / docker-compose file to be included in the submission'), runtimeEngine: z.string().describe('Expected primary runtime engine (e.g. "Node.js", "Python", "JVM", "Go", ".NET CLR", "browser", "unknown")'), - runtimeVersion: z.string().optional().describe('Required runtime version if specified in the challenge (e.g. ">=18", "3.11", "21 LTS")'), + runtimeVersion: z.string().nullable().optional().describe('Required runtime version if specified in the challenge (e.g. ">=18", "3.11", "21 LTS")'), programmingLanguages: z.array(z.string()).describe('Programming languages required by the challenge (e.g. ["TypeScript", "Python"])'), - packageManager: z.string().optional().describe('Expected package manager if mentioned in the challenge (e.g. "npm", "pnpm", "yarn", "pip", "poetry", "maven")'), - buildTool: z.string().optional().describe('Expected build tool if mentioned in the challenge (e.g. "webpack", "vite", "tsc", "gradle", "make")'), - deploymentTarget: z.string().optional().describe('Expected deployment target if specified (e.g. "AWS Lambda", "Vercel", "Heroku", "on-premise", "local")'), - serverType: z.string().optional().describe('Expected server framework or type if specified (e.g. "Express", "NestJS", "FastAPI", "Spring Boot")'), - databaseEngine: z.string().optional().describe('Expected primary database if mentioned in the challenge (e.g. "PostgreSQL", "MongoDB", "DynamoDB")'), - additionalServices: z.array(z.string()).optional().describe('Additional services expected by the challenge (e.g. ["Redis", "RabbitMQ", "Elasticsearch"])'), - notes: z.string().optional().describe('Any other runtime / environment expectations inferred from the challenge spec'), + packageManager: z.string().nullable().optional().describe('Expected package manager if mentioned in the challenge (e.g. "npm", "pnpm", "yarn", "pip", "poetry", "maven")'), + buildTool: z.string().nullable().optional().describe('Expected build tool if mentioned in the challenge (e.g. "webpack", "vite", "tsc", "gradle", "make")'), + deploymentTarget: z.string().nullable().optional().describe('Expected deployment target if specified (e.g. "AWS Lambda", "Vercel", "Heroku", "on-premise", "local")'), + serverType: z.string().nullable().optional().describe('Expected server framework or type if specified (e.g. "Express", "NestJS", "FastAPI", "Spring Boot")'), + databaseEngine: z.string().nullable().optional().describe('Expected primary database if mentioned in the challenge (e.g. "PostgreSQL", "MongoDB", "DynamoDB")'), + additionalServices: z.array(z.string()).nullable().optional().describe('Additional services expected by the challenge (e.g. ["Redis", "RabbitMQ", "Elasticsearch"])'), + notes: z.string().nullable().optional().describe('Any other runtime / environment expectations inferred from the challenge spec'), }); /** @@ -92,10 +92,10 @@ const existingCodebaseSchema = z.object({ 'List of pre-existing artifacts referenced by the challenge (repos, starter code, docs, designs, etc.). ' + 'Empty array if greenfield.', ), - repositoryUrl: z.string().optional().describe( + repositoryUrl: z.string().nullable().optional().describe( 'Primary Git repository URL if an existing codebase is provided', ), - branchOrTag: z.string().optional().describe( + branchOrTag: z.string().nullable().optional().describe( 'Branch, tag, or commit reference to use if specified', ), languages: z.array(z.string()).optional().describe(