-
Notifications
You must be signed in to change notification settings - Fork 4.4k
fix: skip defaults when wrapping tools for gemini #1508
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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
LGTM 👍 |
if required: | ||
default_parameters.append(parameter) | ||
continue | ||
none_default_parameters.append(parameter) | ||
return default_parameters + none_default_parameters |
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.
The change incorrectly sorts parameters by putting required parameters first instead of non-default parameters first, which breaks Python's parameter ordering rules.
📝 Committable Code Suggestion
‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.
if required: | |
default_parameters.append(parameter) | |
continue | |
none_default_parameters.append(parameter) | |
return default_parameters + none_default_parameters | |
if default == Parameter.empty: | |
none_default_parameters.append(parameter) | |
continue | |
default_parameters.append(parameter) | |
return none_default_parameters + default_parameters |
No description provided.