Update claude code provider integration and tests#6
Conversation
Co-authored-by: vmlinz <vmlinz@gmail.com>
|
Cursor Agent can help with this pull request. Just |
|
Merging to
|
There was a problem hiding this comment.
Summary of Changes
Hello @tommy-ca, 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!
I've updated the Claude Code provider integration to leverage the new ai-sdk-provider-claude-code and ai beta packages. This change streamlines our AI model interactions by adopting the latest SDKs and includes the removal of an outdated unit test that no longer aligns with our current testing strategy, focusing on more robust integration tests.
Highlights
- Claude Code Provider Update: I've upgraded the Claude Code provider integration to use the new
ai-sdk-provider-claude-codepackage, enhancing how we interact with Claude models. - AI SDK Core Package Update: I've updated the core
aipackage to its5.0.0-beta.34version, bringing in the latest features and improvements from the AI SDK. - Test Refactoring and Removal: I've removed the
language-model.test.jsunit test, as its assertions on internal implementation details are now handled by the newai-sdk-provider-claude-codepackage or covered by existing integration tests, promoting a more specs-driven testing approach. - Dependency Clean-up: I've streamlined project dependencies by removing several no longer needed packages, including
@ai-sdk/react,jsondiffpatch, andswr, which helps reduce the project's footprint.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| 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 issue 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 or fill out our survey to provide feedback.
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
-
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. ↩
There was a problem hiding this comment.
Code Review
This pull request successfully updates the Claude Code provider to use the official ai-sdk-provider-claude-code package and a beta version of the ai SDK. This is a positive change that reduces custom implementation and aligns with the evolving AI SDK ecosystem. The removal of the obsolete unit test is also a good cleanup step. However, there is a potential risk in using beta dependencies, which could introduce instability. Additionally, the custom SDK implementation files that the removed test was covering now appear to be orphaned and should be removed to prevent dead code in the repository.
| "ai": "5.0.0-beta.34", | ||
| "ai-sdk-provider-claude-code": "1.0.0-beta.1", |
There was a problem hiding this comment.
This change introduces dependencies on beta versions of packages (ai and ai-sdk-provider-claude-code). While this might be necessary to get the latest features, it introduces a risk of instability, bugs, and breaking changes in future updates. It's recommended to closely monitor these packages and be prepared for potential issues, or pin to stable versions once they become available.
Co-authored-by: vmlinz <vmlinz@gmail.com>
Update Claude Code provider to use
ai-sdk-provider-claude-codeandaibeta packages, and remove an obsolete unit test.The
language-model.test.jsunit test was removed as it asserted internal implementation details (e.g., lazy loading, unsupported settings) that are now handled by the newai-sdk-provider-claude-codepackage or covered by existing integration tests, aligning with a specs-driven testing approach.