dify/api/tests/unit_tests/core/tools
EvanYao826 d03d958d49 fix: stop auth header prefix accumulating on repeated Custom Tool calls
When a Custom Tool uses API Key authentication with a Bearer or Basic
prefix, assembling_request mutated runtime.credentials in-place,
prepending the prefix to api_key_value on every call. Subsequent
invocations would read the already-prefixed value and prefix it again,
producing headers like "Bearer Bearer Bearer token".

Use a local variable instead of writing back to the shared credentials
dict, so the stored value is never modified.

Fixes #35974
2026-05-10 21:33:57 +08:00
..
entities Feat: Add "Open Workflow" link in workflow side panel (#28898) 2025-11-29 18:47:12 +08:00
utils chore: add Type to test (#35942) 2026-05-09 03:16:22 +00:00
workflow_as_tool chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
__init__.py test: Unit test cases for core.tools module (#32447) 2026-03-12 11:48:13 +08:00
test_base_tool.py fix(api): include file marker for workflow tool file outputs (#32114) 2026-02-10 16:51:12 +08:00
test_builtin_tool_base.py chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
test_builtin_tool_provider.py chore: add Type to test (#35942) 2026-05-09 03:16:22 +00:00
test_builtin_tools_extra.py chore: add Type to test (#35942) 2026-05-09 03:16:22 +00:00
test_custom_tool_provider.py test: Unit test cases for core.tools module (#32447) 2026-03-12 11:48:13 +08:00
test_custom_tool.py fix: stop auth header prefix accumulating on repeated Custom Tool calls 2026-05-10 21:33:57 +08:00
test_dataset_retriever_tool.py test: Unit test cases for core.tools module (#32447) 2026-03-12 11:48:13 +08:00
test_mcp_tool_provider.py test: Unit test cases for core.tools module (#32447) 2026-03-12 11:48:13 +08:00
test_mcp_tool.py test: Unit test cases for core.tools module (#32447) 2026-03-12 11:48:13 +08:00
test_plugin_tool_provider.py test: Unit test cases for core.tools module (#32447) 2026-03-12 11:48:13 +08:00
test_plugin_tool.py test: Unit test cases for core.tools module (#32447) 2026-03-12 11:48:13 +08:00
test_signature.py fix: Image rendering in the knowledge base failed. (#35914) 2026-05-09 10:06:01 +00:00
test_tool_engine.py fix: fix tool output duplicate (#34962) 2026-04-11 15:07:31 +00:00
test_tool_entities.py Normalize null metadata handling in tool entities (#26890) 2025-10-15 09:42:22 +08:00
test_tool_file_manager.py chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
test_tool_label_manager.py refactor: use sessionmaker in tool_label_manager.py (#34895) 2026-04-14 07:23:29 +00:00
test_tool_manager.py chore: add Type to test (#35942) 2026-05-09 03:16:22 +00:00
test_tool_parameter_type.py feat/enhance the multi-modal support (#8818) 2024-10-21 10:43:49 +08:00
test_tool_provider_controller.py test: Unit test cases for core.tools module (#32447) 2026-03-12 11:48:13 +08:00