-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/ai sdk tools provider options #1
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ge recommendations
Extract tools from AI SDK when execute is passed via providerOptions['github-copilot'].execute and convert them to Copilot defineTool format. Merge with settings.tools. - Add convertAiSdkToolsToCopilotTools conversion - Integrate into session setup and buildSessionConfig - Add examples/tools-ai-sdk.ts and README docs
…for the main branch
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
…s and clarify tool configuration methods
…ration - Replace direct execution function passing in providerOptions with copilotToolOptions for better clarity and usability. - Update README and example to reflect the new usage pattern for AI SDK tools with GitHub Copilot. - Add new copilot-tool-options module to encapsulate the provider options logic.
…ions tests - Refactor existing tests for GitHubCopilotLanguageModel to improve readability and structure. - Add new tests for copilotToolOptions to verify provider options and execute handler functionality. - Ensure comprehensive coverage of model properties and behavior in the tests.
… type safety - Change the type of tools in GitHubCopilotSettings to accept a more specific object structure, enhancing type safety and clarity in tool configurations.
… for flexibility - Modify the tools property in GitHubCopilotSettings to accept any type, allowing for greater flexibility in tool configurations while maintaining clarity in the documentation.
…ilotProviderOptions - Adjust indentation for properties in GitHubCopilotSettings and GitHubCopilotProviderOptions to ensure consistent formatting and improve code readability.
…ed type safety - Change the tools property in GitHubCopilotSettings to use unknown instead of any, enhancing type safety while maintaining flexibility in tool configurations. - Update copilotToolOptions test to reflect the new type definition and ensure proper execution handling.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note
Medium Risk
Medium risk because it changes how tools are assembled and passed into Copilot session creation, which can affect runtime tool availability/behavior in both
doGenerateanddoStream. It’s mitigated by added unit coverage for conversion and merge behavior.Overview
Enables call-level AI SDK
tool()usage by introducing acopilotToolOptions(execute)helper and converting AI SDK function tools (whenproviderOptions['github-copilot'].executeis provided) into CopilotdefineTooltools.Updates session setup to merge model-level
settings.toolswith call-level converted tools beforecreateSession, and adds anexamples/tools-ai-sdk.ts, docs updates, and tests covering conversion/merging. CI is tweaked to run on PRopened/synchronize/reopenedagainstmain, and a newexample:tools-ai-sdkscript is added.Written by Cursor Bugbot for commit 1cab98b. This will update automatically on new commits. Configure here.