refactor!: remove unused experimental features and internal exports#221
Merged
refactor!: remove unused experimental features and internal exports#221
Conversation
BREAKING CHANGE: Remove unused public exports from the SDK Removed exports: - DEFAULT_BASE_URL: Internal implementation detail, users can override via baseUrl option - DEFAULT_HYBRID_ALPHA: Internal constant for meta tools search - Experimental_SchemaOverride: Unused type for schema overrides - Experimental_PreExecuteFunction: Unused type for pre-execute hooks - Experimental_ToolCreationOptions: Unused interface for tool creation Also removed the associated implementation in BaseTool and Tools.getTool() that supported experimental_preExecute and experimental_schemaOverride options. These features were implemented but never used in examples, tests, or documentation. This simplifies the public API surface and removes dead code.
commit: |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes unused experimental features and internal constants from the public API to simplify the SDK's interface. The changes are breaking but affect only undocumented functionality that was never used in examples or tests.
Key changes:
- Removed three experimental types:
Experimental_SchemaOverride,Experimental_PreExecuteFunction, andExperimental_ToolCreationOptions - Removed two internal constants from public exports:
DEFAULT_BASE_URLandDEFAULT_HYBRID_ALPHA(both remain available internally) - Simplified
BaseToolconstructor by removingexperimental_preExecuteparameter and the corresponding property - Simplified
Tools.getTool()method by removing the unused options parameter and all schema override logic
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/types.ts | Removes experimental type definitions for schema override, pre-execute function, and tool creation options |
| src/tool.ts | Removes experimental pre-execute functionality from BaseTool class and simplifies getTool() to a straightforward find operation |
| src/index.ts | Removes public exports of internal constants and experimental types while maintaining internal access |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Dec 12, 2025
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
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.
Summary
Remove unused experimental features and internal implementation details from the public API.
What Changed
Removed exports:
DEFAULT_BASE_URL- Internal constant (users override viabaseUrloption)DEFAULT_HYBRID_ALPHA- Internal constant for meta tools searchExperimental_SchemaOverride- Unused typeExperimental_PreExecuteFunction- Unused typeExperimental_ToolCreationOptions- Unused interfaceRemoved implementation:
BaseTool.experimental_preExecuteproperty and constructor parameterTools.getTool()options parameter and associated schema override logicWhy
These experimental features were implemented but never documented, tested, or used in examples. Removing them:
Breaking Change
This is a breaking change for any users who were importing these types/constants, though usage is expected to be minimal given they were undocumented.
Summary by cubic
Removed undocumented experimental hooks and internal constants from the public API to simplify the SDK and remove dead code. This is a breaking change for anyone importing those exports or using pre-execute/schema override options.
Refactors
Migration
Written for commit e0e7023. Summary will update automatically on new commits.