[PR #6766] fix: tool params null value cover default value #25420

Closed
opened 2026-02-21 20:24:54 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/6766

State: closed
Merged: No


Checklist:

Important

Please review the checklist below before submitting your pull request.

  • Please open an issue before creating a PR or link to an existing issue
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Description

I created an Custom Agent Tool to call a third-party API. In this third-party API parameters, default values will be set for some fields which not passed. However, null values are set for this field currently. As a result, an error occurs when the default field value are overwritten.

✔️ Expected Behavior

21BC4D7A-8345-48cc-AF59-4FF88032BD6A

Actual Behavior

E311C86E-BBC2-43dd-87F4-60718C809EDE

✔️ Repair Behavior

545294B8-BCE1-41ed-9852-E0A745C6CB41

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update, included: Dify Document
  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • Dependency upgrade

Fixes #6948

**Original Pull Request:** https://github.com/langgenius/dify/pull/6766 **State:** closed **Merged:** No --- # Checklist: > [!IMPORTANT] > Please review the checklist below before submitting your pull request. - [x] Please open an issue before creating a PR or link to an existing issue - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods # Description I created an Custom Agent Tool to call a third-party API. In this third-party API parameters, default values will be set for some fields which not passed. However, null values are set for this field currently. As a result, an error occurs when the default field value are overwritten. ✔️ Expected Behavior ![21BC4D7A-8345-48cc-AF59-4FF88032BD6A](https://github.com/user-attachments/assets/f2752bbd-249b-42f5-8ddf-38fc4a10f1d6) ❌ Actual Behavior ![E311C86E-BBC2-43dd-87F4-60718C809EDE](https://github.com/user-attachments/assets/97926269-ac3d-481b-a486-f5a42c79367b) ✔️ Repair Behavior ![545294B8-BCE1-41ed-9852-E0A745C6CB41](https://github.com/user-attachments/assets/777477b7-dd0a-4e35-80ee-c3a2d6c24325) ## Type of Change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [ ] Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement - [ ] Dependency upgrade Fixes #6948
yindo added the pull-request label 2026-02-21 20:24:54 -05:00
yindo closed this issue 2026-02-21 20:24:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#25420