Custom tool testing not working,runtime is required #7424

Closed
opened 2026-02-21 18:20:32 -05:00 by yindo · 1 comment
Owner

Originally created by @leslie2046 on GitHub (Dec 27, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.14.2

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

  1. Create a customize tool by openapi schema
  2. Test it

✔️ Expected Behavior

图片

Actual Behavior

3215cc8ad82749d784b769cda4aed3e

Originally created by @leslie2046 on GitHub (Dec 27, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.14.2 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce 1. Create a customize tool by openapi schema 2. Test it ### ✔️ Expected Behavior ![图片](https://github.com/user-attachments/assets/a019ad8d-f5b8-4af2-975b-59fd8abe92d6) ### ❌ Actual Behavior ![3215cc8ad82749d784b769cda4aed3e](https://github.com/user-attachments/assets/920047a1-cc33-40c6-b6d7-64394a1a81c9)
yindo added the 🔨 feat:tools label 2026-02-21 18:20:32 -05:00
yindo closed this issue 2026-02-21 18:20:32 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 27, 2024):

The error message "runtime is required" suggests that the runtime object, which should contain necessary credentials like the API key, is not properly initialized or is missing. This is likely why the tool testing for the queryWeather function is not working as expected.

To resolve this issue, ensure that the runtime object is correctly set up and includes the required api_key for accessing the OpenWeather API. Without this key, the function cannot authenticate and retrieve the weather data [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Dec 27, 2024): <!-- Answer --> The error message "runtime is required" suggests that the `runtime` object, which should contain necessary credentials like the API key, is not properly initialized or is missing. This is likely why the tool testing for the `queryWeather` function is not working as expected. To resolve this issue, ensure that the `runtime` object is correctly set up and includes the required `api_key` for accessing the OpenWeather API. Without this key, the function cannot authenticate and retrieve the weather data <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/tools/provider/builtin/openweather/tools/weather.py)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/86af7017-d068-4556-a3e4-e526c0e099b4?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/86af7017-d068-4556-a3e4-e526c0e099b4?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/86af7017-d068-4556-a3e4-e526c0e099b4?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/86af7017-d068-4556-a3e4-e526c0e099b4?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/86af7017-d068-4556-a3e4-e526c0e099b4?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/86af7017-d068-4556-a3e4-e526c0e099b4?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7424