-
Notifications
You must be signed in to change notification settings - Fork 1
chore: remove unused Claude Code provider configuration #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 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.
Learn moreAll Green is an AI agent that automatically: ✅ Addresses code review comments ✅ Fixes failing CI checks ✅ Resolves merge conflicts |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this 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.
|
Caution Review failedThe pull request is closed. Summary by CodeRabbitRelease Notes
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughThis 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (14)
✏️ Tip: You can disable this entire section by setting 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. Comment |
|
🤖 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. |
Summary of ChangesHello @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 Highlights
Using Gemini Code AssistThe 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
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 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
|
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRemoves 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 configurationclassDiagram
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
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
🤖 I'm sorry @ssdeanx, but I was unable to process your request. Please see the logs for more details. |
There was a problem hiding this 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 incopywriterAgent.tslooks 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.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this 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.
| //import { | ||
| // createCompletenessScorer, | ||
| // createTextualDifferenceScorer, | ||
| // createToneScorer, | ||
| //} from '../evals/scorers/prebuilt' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | ||
| }, | ||
| model: google3, | ||
| model: 'google/gemini-2.5-flash-lite-preview-09-2025', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| model: 'google/gemini-2.5-flash-lite-preview-09-2025', | |
| model: googleAIFlashLite, |
| // toneConsistency: { scorer: createToneScorer() }, | ||
| // textualDifference: { scorer: createTextualDifferenceScorer() }, | ||
| // completeness: { scorer: createCompletenessScorer() }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| workflows: {}, | ||
| maxRetries: 5, | ||
| outputProcessors: [new TokenLimiterProcessor(1048576)], | ||
| outputProcessors: [new TokenLimiterProcessor(128576)], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| outputProcessors: [new TokenLimiterProcessor(128576)], | |
| outputProcessors: [new TokenLimiterProcessor(MAX_OUTPUT_TOKENS)], |
There was a problem hiding this 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', |
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
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.
| model: 'google/gemini-2.5-flash-lite-preview-09-2025', | |
| model: 'google/gemini-3-flash-preview', |
| workflows: {}, | ||
| maxRetries: 5, | ||
| outputProcessors: [new TokenLimiterProcessor(1048576)], | ||
| outputProcessors: [new TokenLimiterProcessor(128576)], |
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
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.
| outputProcessors: [new TokenLimiterProcessor(128576)], | |
| outputProcessors: [new TokenLimiterProcessor(1048576)], |
| export * from './anthropic' | ||
| export * from './github-copilot' | ||
| export * from './gemini-cli' | ||
| export * from './ai-gateway' |
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
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.
| export * from './ai-gateway' |

Summary by Sourcery
Remove obsolete Claude Code and vector configuration, simplify the copywriter agent configuration, and clean up generated and unused code.
Enhancements:
Chores: