Skip to content

Conversation

@ACAne0320
Copy link
Contributor

Summary

fixed #18976

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Copilot AI review requested due to automatic review settings July 10, 2025 12:20
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 10, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the HTTP request builder to omit optional parameters when they aren’t provided, rather than including them with a null value.

  • Remove assignment of None for missing optional parameters
  • Add a no-op (pass) with explanation in the parameter-handling branch
Comments suppressed due to low confidence (1)

api/core/tools/custom_tool/tool.py:215

  • Update the docstring for do_http_request to mention that optional parameters are now omitted instead of being set to None, so consumers know this change in behavior.
                        else:

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 10, 2025
@crazywoola crazywoola merged commit f4df80e into langgenius:main Jul 10, 2025
6 checks passed
yijiaquan pushed a commit to yijiaquan/dify that referenced this pull request Jul 14, 2025
tutkun pushed a commit to tutkun/dify that referenced this pull request Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom Tool Error: Unable to handle optional parameters in requestBody

2 participants