-
Notifications
You must be signed in to change notification settings - Fork 2k
Add adapter_kwargs parameter to MCPClient #1528
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
Add adapter_kwargs parameter to MCPClient #1528
Conversation
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.
Thanks for the addition, @LucasDltg.
However, please note that the client_session_timeout_seconds
was only introduced in mcpadapt-0.1.10, whereas we currently support mcpadapt>=0.1.8
.
To maintain compatibility with older versions, maybe we could expose a more generic adapter_kwargs
param instead and pass it through to MCPAdapt
, so users can customize it depending on their installed version.
Let me know what you think.
Sounds good to me. I have updated the PR. |
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.
Thanks for the update!
Could you please add the new parameter to the docstring? Also, the parameter should be optional, so there are no breaking changes.
src/smolagents/mcp_client.py
Outdated
@@ -79,6 +79,7 @@ class MCPClient: | |||
def __init__( | |||
self, | |||
server_parameters: "StdioServerParameters" | dict[str, Any] | list["StdioServerParameters" | dict[str, Any]], | |||
adapter_kwargs: dict[str, Any] |
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.
You made this parameter required. Could you please make it optional?
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.
No description provided.