fix(toolbox-core): Expose authorization token requirements on ToolboxTool#294
Merged
anubhav756 merged 3 commits intomainfrom Jun 24, 2025
Merged
fix(toolbox-core): Expose authorization token requirements on ToolboxTool#294anubhav756 merged 3 commits intomainfrom
ToolboxTool#294anubhav756 merged 3 commits intomainfrom
Conversation
fcf2143 to
3fe904a
Compare
ToolboxTool
Contributor
Author
|
/gcbrun |
ToolboxToolToolboxTool
This was referenced Jun 19, 2025
twishabansal
approved these changes
Jun 23, 2025
This is used in a future PR where we inspect this protected value from the wrapper classes to implement self-authenticated tools.
d42e234 to
d25545b
Compare
kurtisvg
approved these changes
Jun 23, 2025
kurtisvg
reviewed
Jun 23, 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
This PR exposes the authorization token requirements from the
ToolboxToolclass by promoting the internal list of required authorization tokens to a read-only property.Motivation
Currently, the list of authorization services that a tool requires is stored as a private attribute within the
ToolboxToolinstance. This encapsulation makes it difficult for external wrapper classes or orchestration layers to programmatically inspect a tool and determine its authentication needs.The ultimate goal, which will be implemented in a future PR (#291), is to enable self-authenticated tools. This feature requires the ability for
toolbox-langchainwrapper to introspect a tool instance, identify its authorization requirements, and potentially manage the token acquisition lifecycle automatically. Currently we only expose authentication requirements, that is a map of parameter names to the corresponding applicable authentication services.This PR is the necessary first step, providing a clean and stable public API to access this information.
Changes Proposed
required_authz_tokens, has been added to theToolboxToolclass.('my-auth-service', 'another-service')) required by the tool.ToolboxToolcore class, avoiding the need to access private (__ToolboxTool_) attributes.Note
This change is non-breaking and purely additive.