Skip to content

Conversation

@ssdeanx
Copy link
Owner

@ssdeanx ssdeanx commented Jan 15, 2026

  • Deleted the claude-code.ts file which contained the Claude Code provider instance and related exports.
  • This change helps in cleaning up the codebase by removing obsolete code that is no longer needed.

Summary by Sourcery

Remove obsolete Claude Code and vector configuration, simplify the copywriter agent configuration, and clean up generated and unused code.

Enhancements:

  • Update the copywriter agent to use a new Gemini model identifier and adjust its output token limit.
  • Temporarily disable scoring configuration for the copywriter agent by commenting out scorer imports and registrations.
  • Silence linting on Convex generated API and server utilities to avoid spurious lint errors.

Chores:

  • Remove the unused Claude Code provider configuration from the shared config exports.
  • Delete legacy vector configuration files and custom processor implementations that are no longer used.

- Deleted the claude-code.ts file which contained the Claude Code provider instance and related exports.
- This change helps in cleaning up the codebase by removing obsolete code that is no longer needed.
Copilot AI review requested due to automatic review settings January 15, 2026 17:32
@continue
Copy link

continue bot commented Jan 15, 2026

All Green - Keep your PRs mergeable

Learn more

All Green is an AI agent that automatically:

✅ Addresses code review comments

✅ Fixes failing CI checks

✅ Resolves merge conflicts


Unsubscribe from All Green comments

@vercel
Copy link

vercel bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
agent-stack Building Building Preview, Comment Jan 15, 2026 5:32pm

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai
Copy link

coderabbitai bot commented Jan 15, 2026

Caution

Review failed

The pull request is closed.

Summary by CodeRabbit

Release Notes

  • Breaking Changes

    • Removed Claude Code provider and models.
    • Removed vector database integrations: AstraDB, ChromaDB, Cloudflare, Couchbase, OpenSearch, Pinecone, and S3Vectors.
    • Removed custom output and dynamic model processors.
  • Changes

    • Updated Copywriter Agent configuration with adjusted token limits and new model reference.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

This PR removes multiple vector store backend integrations (Astra, Chroma, Cloudflare, Couchbase, OpenSearch, Pinecone, S3Vectors), eliminates the Claude Code provider configuration, deletes two custom processors, and updates the copywriter agent with a new model reference, reduced token limits, and a new optional interface field.

Changes

Cohort / File(s) Summary
Agent Configuration Updates
src/mastra/agents/copywriterAgent.ts
Added optional contentType?: string to CopywriterAgentContext interface. Replaced Google model reference from import to string literal 'google/gemini-2.5-flash-lite-preview-09-2025'. Reduced TokenLimiterProcessor token limit from 1048576 to 128576. Commented out prebuilt scorers (toneConsistency, textualDifference, completeness).
Provider Removals
src/mastra/config/claude-code.ts, src/mastra/config/index.ts
Deleted entire Claude Code provider module with all exports (getClaudeCodeChatModel, claudeCodeChatModels, claudeCodeOpus, claudeCodeSonnet, claudeCodeHaiku, claudeCodeProvider). Removed corresponding barrel export in config index.
Vector Store Integrations Removed
src/mastra/config/vector/{astra,chroma,cloudflare,couchbase,opensearch,pinecone,s3vectors}.ts
Deleted seven complete vector store implementations. Each removal eliminates: metadata filter types/interfaces, configuration constants (*_CONFIG), initialization and document processing functions, embedding storage utilities, filter transformation/validation helpers, query functions, and public tool exports (\\*QueryTool, \\*GraphTool). Total ~2,400 lines removed.
Processor Removals
src/mastra/processors/custom-output.ts, src/mastra/processors/step-processor.ts
Deleted CustomOutputProcessor (filtered system messages from output) and DynamicModelProcessor (provided step-based model/tool configuration).
Documentation Removal
src/mastra/config/vector/AGENTS.md
Deleted comprehensive vector store configuration documentation including sections on personas, architecture, configuration patterns, usage, selection criteria, and troubleshooting.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 Away go vectors, Claude, and tools so grand,
The copywriter finds a lighter land,
With flash-lite speed and token bounds more tight,
New fields emerge, the config burns so bright!
A cleaner slate, let simpler paths take flight!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop


📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 46b5c1e and 832aa5b.

⛔ Files ignored due to path filters (2)
  • convex/_generated/api.js is excluded by !**/_generated/**
  • convex/_generated/server.js is excluded by !**/_generated/**
📒 Files selected for processing (14)
  • src/mastra/agents/copywriterAgent.ts
  • src/mastra/config/claude-code.ts
  • src/mastra/config/index.ts
  • src/mastra/config/vector/AGENTS.md
  • src/mastra/config/vector/astra.ts
  • src/mastra/config/vector/chroma.ts
  • src/mastra/config/vector/cloudflare.ts
  • src/mastra/config/vector/couchbase.ts
  • src/mastra/config/vector/opensearch.ts
  • src/mastra/config/vector/pinecone.ts
  • src/mastra/config/vector/registry.ts
  • src/mastra/config/vector/s3vectors.ts
  • src/mastra/processors/custom-output.ts
  • src/mastra/processors/step-processor.ts

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

🤖 Hi @ssdeanx, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ssdeanx, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request streamlines the codebase by eliminating obsolete and unused components. The primary goal is to reduce technical debt and simplify the project's configuration by removing the Claude Code provider, several vector store integrations, and custom processors that are no longer required. Additionally, the copywriterAgent has been updated to reflect current model usage and resource limits.

Highlights

  • Claude Code Provider Removal: The claude-code.ts file and its related exports have been entirely removed, indicating that the Claude Code provider is no longer in use within the project.
  • Copywriter Agent Configuration Update: The copywriterAgent.ts file has been updated to remove unused imports (google3, scorer functions), switch to a specific Gemini model string literal, and adjust the TokenLimiterProcessor value for efficiency.
  • Vector Store Configuration Cleanup: Several files related to various vector database integrations (AstraDB, ChromaDB, Cloudflare, Couchbase, OpenSearch, Pinecone, S3Vectors) and their associated documentation (AGENTS.md) have been deleted, streamlining the vector store configurations.
  • Custom Processors Removal: Two custom processor files, custom-output.ts and step-processor.ts, which were likely no longer needed, have been deleted from the codebase.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@sourcery-ai
Copy link

sourcery-ai bot commented Jan 15, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Removes the obsolete Claude Code provider configuration and several unused vector and processor configuration files, while also updating the copywriter agent’s model configuration and temporarily disabling scoring and reducing the token limit, plus adding ESLint disable comments to generated Convex files.

Updated class diagram for copywriter agent configuration

classDiagram

class CopywriterAgentContext {
  +string userId
  +string requestId
}

class CopywriterAgentConfig {
  +string name
  +string description
  +string instructions
  +string model
  +any memory
  +number maxRetries
  +TokenLimiterProcessor[] outputProcessors
}

class TokenLimiterProcessor {
  +TokenLimiterProcessor(number maxTokens)
  +process(string output)
}

class WebScraperTool
class ChartSupervisorTool

class Scorers {
  +ToneScorer toneConsistency
  +TextualDifferenceScorer textualDifference
  +CompletenessScorer completeness
}

class ToneScorer
class TextualDifferenceScorer
class CompletenessScorer

CopywriterAgentConfig "1" o-- "1" CopywriterAgentContext
CopywriterAgentConfig "1" o-- "*" WebScraperTool
CopywriterAgentConfig "1" o-- "*" ChartSupervisorTool
CopywriterAgentConfig "1" o-- "*" TokenLimiterProcessor
CopywriterAgentConfig "0..1" o-- "1" Scorers
Scorers "1" o-- "1" ToneScorer
Scorers "1" o-- "1" TextualDifferenceScorer
Scorers "1" o-- "1" CompletenessScorer
Loading

File-Level Changes

Change Details Files
Update copywriter agent configuration to use a literal Gemini model id, disable scorers, and adjust output token limit.
  • Replace the imported google3 model reference with a string literal model id google/gemini-2.5-flash-lite-preview-09-2025 in the copywriter agent configuration.
  • Comment out imports of prebuilt scorers and their usage under the scorers key, effectively disabling tone, textual difference, and completeness scoring for the agent.
  • Lower the TokenLimiterProcessor limit from 1,048,576 to 128,576 tokens in the agent’s outputProcessors configuration.
  • Add a small formatting change and comment separation around tool imports in the agent file.
src/mastra/agents/copywriterAgent.ts
Mark Convex generated files as ESLint-exempt to avoid lint noise.
  • Insert /* eslint-disable */ pragma at the top of the generated Convex API helper file.
  • Insert /* eslint-disable */ pragma at the top of the generated Convex server utilities file.
convex/_generated/api.js
convex/_generated/server.js
Remove unused Claude Code provider configuration from the Mastra config exports.
  • Delete the claude-code configuration file from the Mastra config directory.
  • Remove the export of ./claude-code from the Mastra config index so it is no longer part of the public configuration surface.
src/mastra/config/index.ts
src/mastra/config/claude-code.ts
Delete unused vector store configuration examples and custom processors that are no longer needed.
  • Remove vector configuration documentation for agents and multiple vector backend configuration files (Astra, Chroma, Cloudflare, Couchbase, OpenSearch, Pinecone, S3 vectors).
  • Delete custom output and step processor implementations that are no longer used by the current codebase.
src/mastra/config/vector/AGENTS.md
src/mastra/config/vector/astra.ts
src/mastra/config/vector/chroma.ts
src/mastra/config/vector/cloudflare.ts
src/mastra/config/vector/couchbase.ts
src/mastra/config/vector/opensearch.ts
src/mastra/config/vector/pinecone.ts
src/mastra/config/vector/s3vectors.ts
src/mastra/processors/custom-output.ts
src/mastra/processors/step-processor.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@ssdeanx ssdeanx merged commit b5bbaaa into main Jan 15, 2026
18 of 25 checks passed
@github-actions
Copy link

🤖 I'm sorry @ssdeanx, but I was unable to process your request. Please see the logs for more details.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Instead of commenting out the scorer imports and configuration in copywriterAgent.ts, consider guarding them with a feature flag or configuration option so the code stays clean and it’s clear when/how to re-enable them.
  • The new TokenLimiterProcessor(128576) value in copywriterAgent.ts looks like it might be a typo relative to the prior 1,048,576 limit; if the change is intentional, consider adding a brief comment explaining the significantly lower, non-round value.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Instead of commenting out the scorer imports and configuration in `copywriterAgent.ts`, consider guarding them with a feature flag or configuration option so the code stays clean and it’s clear when/how to re-enable them.
- The new `TokenLimiterProcessor(128576)` value in `copywriterAgent.ts` looks like it might be a typo relative to the prior 1,048,576 limit; if the change is intentional, consider adding a brief comment explaining the significantly lower, non-round value.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request is titled 'chore: remove unused Claude Code provider configuration', but it removes a significant amount of code beyond that, including multiple vector store configurations, documentation, and processors. This discrepancy makes it difficult to understand the full scope and impact of the changes from the title and description alone. For better repository history and easier reviews, I strongly recommend either updating the PR title and description to be comprehensive or splitting these changes into smaller, more focused pull requests.

Regarding the code changes themselves, I've noticed a few opportunities in src/mastra/agents/copywriterAgent.ts to improve maintainability by removing commented-out code and replacing hardcoded values with constants.

Comment on lines +18 to +22
//import {
// createCompletenessScorer,
// createTextualDifferenceScorer,
// createToneScorer,
//} from '../evals/scorers/prebuilt'
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.

}
},
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,

Comment on lines +88 to +90
// toneConsistency: { scorer: createToneScorer() },
// textualDifference: { scorer: createTextualDifferenceScorer() },
// completeness: { scorer: createCompletenessScorer() },
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.

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
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request removes unused configuration files and makes adjustments to the copywriterAgent. The primary focus is on cleaning up obsolete code, though it introduces some unintended changes that affect agent behavior.

Changes:

  • Removed the Claude Code provider configuration (claude-code.ts) and its export from the config index
  • Deleted two processor files (step-processor.ts and custom-output.ts)
  • Deleted multiple vector store configuration files (s3vectors.ts, pinecone.ts, opensearch.ts, couchbase.ts, cloudflare.ts, chroma.ts, astra.ts) and their documentation (AGENTS.md)
  • Modified copywriterAgent to use a hardcoded model string and reduced TokenLimiter capacity, while commenting out scorer functionality
  • Added eslint-disable comments to generated Convex files

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/mastra/config/claude-code.ts Deleted entire Claude Code provider configuration file with model exports
src/mastra/config/index.ts Removed export statement for claude-code module
src/mastra/processors/step-processor.ts Deleted DynamicModelProcessor class that handled step-based model selection
src/mastra/processors/custom-output.ts Deleted CustomOutputProcessor for message and stream filtering
src/mastra/config/vector/s3vectors.ts Deleted comprehensive S3 Vectors configuration with 358 lines
src/mastra/config/vector/pinecone.ts Deleted Pinecone vector database configuration with 339 lines
src/mastra/config/vector/opensearch.ts Deleted OpenSearch vector database configuration with 344 lines
src/mastra/config/vector/couchbase.ts Deleted Couchbase vector database configuration with 356 lines
src/mastra/config/vector/cloudflare.ts Deleted Cloudflare Vectorize configuration with 388 lines
src/mastra/config/vector/chroma.ts Deleted ChromaDB configuration with 365 lines
src/mastra/config/vector/astra.ts Deleted AstraDB configuration with 350 lines
src/mastra/config/vector/AGENTS.md Deleted comprehensive vector store documentation with selection criteria
src/mastra/agents/copywriterAgent.ts Replaced google3 import with hardcoded model string, reduced TokenLimiter from 1MB to 128KB, commented out scorers
convex/_generated/server.js Added eslint-disable comment to generated file
convex/_generated/api.js Added eslint-disable comment to generated file

}
},
model: google3,
model: 'google/gemini-2.5-flash-lite-preview-09-2025',
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.
workflows: {},
maxRetries: 5,
outputProcessors: [new TokenLimiterProcessor(1048576)],
outputProcessors: [new TokenLimiterProcessor(128576)],
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.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants