Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion convex/_generated/api.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable */
/**
* Generated `api` utility.
*
Expand Down
2 changes: 1 addition & 1 deletion convex/_generated/server.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable */
/**
* Generated utilities for implementing server-side Convex query and mutation functions.
*
Expand Down
22 changes: 11 additions & 11 deletions src/mastra/agents/copywriterAgent.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Agent } from '@mastra/core/agent'
import { google3 } from '../config/google'
import { log } from '../config/logger'
import { pgMemory } from '../config/pg-storage'
import {
Expand All @@ -16,12 +15,13 @@ import type { GoogleGenerativeAIProviderOptions } from '@ai-sdk/google'
import { InternalSpans } from '@mastra/core/observability'
import { TokenLimiterProcessor } from '@mastra/core/processors'
import type { RequestContext } from '@mastra/core/request-context'
import {
createCompletenessScorer,
createTextualDifferenceScorer,
createToneScorer,
} from '../evals/scorers/prebuilt'
//import {
// createCompletenessScorer,
// createTextualDifferenceScorer,
// createToneScorer,
//} from '../evals/scorers/prebuilt'
Comment on lines +18 to +22
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This import for scorers is commented out. To maintain a clean codebase, it's best to remove unused, commented-out code. If this functionality is needed in the future, it can be retrieved from version control history.

import { chartSupervisorTool } from '../tools/financial-chart-tools'

// Define runtime context for this agent
export interface CopywriterAgentContext {
userId?: string
Expand Down Expand Up @@ -72,7 +72,7 @@ Create compelling content (blog, marketing, social, technical, business, creativ
},
}
},
model: google3,
model: 'google/gemini-2.5-flash-lite-preview-09-2025',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The model ID is hardcoded here. To improve maintainability and prevent magic strings, it's better to use a named constant. The ../config/google.ts file already exports googleAIFlashLite which is the model object for this ID. Please consider importing and using it here. This would involve adding import { googleAIFlashLite } from '../config/google'; to your imports.

Suggested change
model: 'google/gemini-2.5-flash-lite-preview-09-2025',
model: googleAIFlashLite,

Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removed import 'google3' is still being used in other agent files (codingAgents.ts, contentStrategistAgent.ts, knowledgeIndexingAgent.ts, reportAgent.ts) and the codingTeamNetwork.ts file. Removing the claude-code.ts file and its export from index.ts breaks the consistency, but more importantly, you've replaced the google3 model reference with a hardcoded string 'google/gemini-2.5-flash-lite-preview-09-2025' in this file. However, google3 is defined as googleChatModels.gemini3Flash which maps to 'gemini-3-flash-preview', not 'gemini-2.5-flash-lite-preview-09-2025'. This inconsistency means the copywriterAgent is now using a different model than intended, which could affect its behavior compared to other agents that still use google3.

Suggested change
model: 'google/gemini-2.5-flash-lite-preview-09-2025',
model: 'google/gemini-3-flash-preview',

Copilot uses AI. Check for mistakes.
memory: pgMemory,
tools: {
webScraperTool,
Expand All @@ -85,9 +85,9 @@ Create compelling content (blog, marketing, social, technical, business, creativ
chartSupervisorTool,
},
scorers: {
toneConsistency: { scorer: createToneScorer() },
textualDifference: { scorer: createTextualDifferenceScorer() },
completeness: { scorer: createCompletenessScorer() },
// toneConsistency: { scorer: createToneScorer() },
// textualDifference: { scorer: createTextualDifferenceScorer() },
// completeness: { scorer: createCompletenessScorer() },
Comment on lines +88 to +90
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These scorers are commented out. This is considered dead code and should be removed to improve code clarity. If these are needed later, they can be restored from the git history.

},
options: {
tracingPolicy: {
Expand All @@ -96,7 +96,7 @@ Create compelling content (blog, marketing, social, technical, business, creativ
},
workflows: {},
maxRetries: 5,
outputProcessors: [new TokenLimiterProcessor(1048576)],
outputProcessors: [new TokenLimiterProcessor(128576)],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The value 128576 is a magic number, which can make the code's intent unclear. It's a good practice to define such numbers as constants with descriptive names (e.g., const MAX_OUTPUT_TOKENS = 128576;) at the top of the file. This improves readability and makes future changes easier.

Suggested change
outputProcessors: [new TokenLimiterProcessor(128576)],
outputProcessors: [new TokenLimiterProcessor(MAX_OUTPUT_TOKENS)],

Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TokenLimiter value has been changed from 1048576 (1MB) to 128576 (~128KB), which is approximately 8x smaller. This significant reduction in token limit could cause issues with longer content generation tasks that the copywriterAgent is designed to handle. Since this agent creates blog posts, marketing copy, and other potentially lengthy content, this reduced limit may result in truncated outputs or failures when generating comprehensive content.

Suggested change
outputProcessors: [new TokenLimiterProcessor(128576)],
outputProcessors: [new TokenLimiterProcessor(1048576)],

Copilot uses AI. Check for mistakes.
// defaultOptions: {
// autoResumeSuspendedTools: true,
// },
Expand Down
41 changes: 0 additions & 41 deletions src/mastra/config/claude-code.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/mastra/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ export * from './anthropic'
export * from './github-copilot'
export * from './gemini-cli'
export * from './ai-gateway'
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package 'ai-sdk-provider-claude-code' is still listed as a dependency in package.json but the corresponding configuration file (claude-code.ts) and its export have been removed. This creates a mismatch between the dependencies and the codebase. Consider removing the unused dependency from package.json to keep the project clean and avoid unnecessary package installations.

Suggested change
export * from './ai-gateway'

Copilot uses AI. Check for mistakes.
export * from './claude-code'
238 changes: 0 additions & 238 deletions src/mastra/config/vector/AGENTS.md

This file was deleted.

Loading
Loading