Skip to content

Update claude code provider integration and tests#6

Draft
tommy-ca wants to merge 2 commits intomainfrom
cursor/update-claude-code-provider-integration-and-tests-82bd
Draft

Update claude code provider integration and tests#6
tommy-ca wants to merge 2 commits intomainfrom
cursor/update-claude-code-provider-integration-and-tests-82bd

Conversation

@tommy-ca
Copy link
Owner

@tommy-ca tommy-ca commented Aug 9, 2025

Update Claude Code provider to use ai-sdk-provider-claude-code and ai beta packages, and remove an obsolete unit test.

The language-model.test.js unit test was removed as it asserted internal implementation details (e.g., lazy loading, unsupported settings) that are now handled by the new ai-sdk-provider-claude-code package or covered by existing integration tests, aligning with a specs-driven testing approach.


Open in Cursor Open in Web

Co-authored-by: vmlinz <vmlinz@gmail.com>
@cursor
Copy link

cursor bot commented Aug 9, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@trunk-io
Copy link

trunk-io bot commented Aug 9, 2025

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

Copy link

@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.

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-code package, enhancing how we interact with Claude models.
  • AI SDK Core Package Update: I've updated the core ai package to its 5.0.0-beta.34 version, bringing in the latest features and improvements from the AI SDK.
  • Test Refactoring and Removal: I've removed the language-model.test.js unit test, as its assertions on internal implementation details are now handled by the new ai-sdk-provider-claude-code package 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, and swr, 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

  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.

Copy link

@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 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.

Comment on lines +55 to +56
"ai": "5.0.0-beta.34",
"ai-sdk-provider-claude-code": "1.0.0-beta.1",

Choose a reason for hiding this comment

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

medium

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