Skip to content

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

Merged
merged 6 commits into from
Apr 1, 2025
Merged

Conversation

angrybayblade
Copy link
Collaborator

No description provided.

Copy link

vercel bot commented Mar 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
composio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 1, 2025 9:13am

@angrybayblade angrybayblade marked this pull request as ready for review March 31, 2025 07:18
Copy link

LGTM 👍

Comment on lines +364 to +368
if required:
default_parameters.append(parameter)
continue
none_default_parameters.append(parameter)
return default_parameters + none_default_parameters

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.

Suggested change
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

@angrybayblade angrybayblade merged commit 8651e77 into master Apr 1, 2025
19 of 23 checks passed
@angrybayblade angrybayblade deleted the fix/PDENG-68 branch April 1, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant