-
Notifications
You must be signed in to change notification settings - Fork 15
chore(core): update __parse_tool to return which parameters were bound and authenticated #184
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
Conversation
508c460
to
a37e5cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this PR is doing a couple of different things that would be better done separately.
- Adding "add_auth_token_getters" to langchain-toolbox (and deprecating 'add_auth_tokens'
- Adding two additional returns to "__parse_tool" helper function in the ToolboxTool class.
It's important we separate these, the first is a breaking breaking change and the second is an internal refactor building up to some other changes?
Alright, I'm slightly confused on what this PR presents -- I see #182, but the diff seems to show the diff vs main? |
508c460
to
2388dc9
Compare
I remember I had bifurcated these PRs 🤔 |
I think that was because I hadn't yet pushed the base PR. Can you check now. Thanks! 🙂 |
5d59af9
to
e841bc1
Compare
Just pushed the feat to add headers to Toolbox: #178. Should we also return the client headers along with the bound and the auth params? |
c1f1e27
to
d0d61f5
Compare
…r Client Strictness This commit introduces functionality to the `parse_tool` helper to identify and report which bound and authentication keys are actively used during tool parsing. This is a foundational step towards implementing a more robust and predictable client through a new `strict` mode. The ability to determine used keys will allow the client to: * Provide errors when users supply unnecessary authentication or bound parameters (in non-`strict` mode). * Enforce that all provided authentication and bound parameters are consumed by the loaded tools, ensuring no extraneous or potentially misleading information is present (in `strict` mode).
e841bc1
to
9a0c077
Compare
Currently, we return the bound keys and auth keys used during tool loading. This logic doesn't directly apply to client headers. Client headers are inherently part of the tool's invocation request, guaranteeing their presence. Therefore, unlike bound and auth keys, there's no immediate need to validate their usage. Consequently, this PR won't return client headers from the helper function. We can revisit this in a future PR if we decide to introduce client header validation (e.g., specifying required headers in the tools file). |
This commit introduces functionality to the
parse_tool
helper to identify and report which bound and authentication keys are actively used during tool parsing. This is a foundational step towards implementing a more robust and predictable client through a newstrict
mode.The ability to determine used keys will allow the client to:
strict
mode).strict
mode).