Skip to content

fix(agent): run build-chat finalization as ephemeral runtime turn - #46218

Open
BeautyyuYanli wants to merge 6 commits into
mainfrom
dify-2675-prompt-leak-issue
Open

BeautyyuYanli wants to merge 6 commits into
mainfrom
dify-2675-prompt-leak-issue

Conversation

@BeautyyuYanli

@BeautyyuYanli BeautyyuYanli commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

This PR is made with gpt-6.1-sol (Codex), gemini-4-carbon (Google Antigravity), gpt-6.2-sol (Codex), and gemini-4-neon (Google Antigravity), while I'm responsible for all the changes.

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Fixes DIFY-2675

Execute POST /console/api/agent/<agent_id>/build-chat/finalize as a synchronous, ephemeral BUILD_DRAFT runtime turn instead of routing the internal Build chat consolidation prompt through normal chat message generation (AppGenerateService.generate / AgentAppGenerator.generate).

Previously, clicking Apply in Agent Build mode invoked build-chat/finalize via _generate_chat_message(..., query=_BUILD_CHAT_FINALIZATION_QUERY) and drained the SSE stream server-side. Because that reused the persisted chat pipeline, the internal consolidation prompt and FINISHED reply were written as Message and MessageAgentThought rows on the editor's DEBUG_BUILD conversation, updated Conversation counters/summaries, wrote back to the BUILD_DRAFT binding's session_snapshot, and triggered user-input guards and message-scoped tracing. Refreshing the page while finalize was in flight—or retrying after a failed finalize / build-draft/apply before debug conversation rotation—exposed the internal prompt directly in GET /console/api/agent/<agent_id>/chat-messages and retained it in historical conversation logs.

Key Changes

  • Ephemeral Runtime Turn (api/core/app/apps/agent_app/app_runner.py, api/core/app/apps/agent_app/runtime_request_builder.py):
    • Move _BUILD_CHAT_FINALIZATION_QUERY into app_runner.py, extract shared non-succeeded terminal error mapping, and add AgentAppRunner.run_finalization to run against the resolved BUILD_DRAFT workspace binding (reading existing Build chat session_snapshot history and allowing build_draft config-note updates) without creating/mutating Message or MessageAgentThought rows.
    • Intentionally discard terminal.session_snapshot on both success and failure so internal finalization prompts never enter BUILD_DRAFT conversation history if build-draft/apply subsequently fails or the editor continues chatting/retries Apply.
    • Bound create_run and SSE consumption under a shared monotonic APP_MAX_EXECUTION_TIME deadline (Build chat finalization timed out.), with an independent up-to-5s cancellation confirmation budget (cancel_run_and_wait) on stream failure/deadline expiry.
    • Add AgentAppRuntimeBuildContext.collect_message_trace: bool = True so ephemeral turns using a fresh per-run UUID idempotency_key skip message-scoped tracing_hooks.prepare_agent_app.
  • Generator, DB Session Hygiene, Guardrails & Console Controller (api/core/app/apps/agent_app/app_generator.py, api/core/workflow/nodes/agent_v2/dify_tools_builder.py, api/services/agent/workspace_service.py, api/services/app_generate_service.py, api/controllers/console/app/completion.py):
    • Add AgentAppGenerator.finalize_build_chat to resolve the editor's DEBUG_BUILD draft, validate AgentSoulConfig and model credentials up front, commit the caller DB session before delegating, use short-lived sessions during workflow/MCP tool lookups, and close the request-scoped DB session before external dify-agent network I/O.
    • Sanitize first-Apply workspace allocation failures to a fixed 400 Agent workspace allocation failed. response while retaining detailed diagnostics in server logs and exception chains.
    • Add AppGenerateService.finalize_agent_build_chat wrapping _run_with_guardrails(..., streaming=False) so workflow quota reservation/refund and active-request rate-limit slots remain enforced for the full synchronous run.
    • Remove _drain_streaming_generate_response from completion.py and share Console chat error translation across _generate_chat_message and _create_build_chat_finalization_message.
  • dify-agent Client Deadline Enforcement (dify-agent/src/dify_agent/client/_client.py, dify-agent/src/dify_agent/client/_http_deadline.py):
    • Propagate per-call remaining execution budgets across single-connection HTTPX/httpcore requests (TCP address fallback, partial writes, response headers, and per-chunk body/SSE reads) while preserving cursor-based SSE reconnects and wait_run(..., timeout_seconds=0) single-poll semantics.
  • Tests:
    • Add and update unit tests across api/tests/unit_tests/ and dify-agent/tests/local/dify_agent/client/test_client.py covering ephemeral finalization invariants, DB session release, workspace allocation error sanitization, guardrail retention, Console HTTP error mappings, and deterministic sync/async HTTP deadline enforcement.

Screenshots

Before After
Internal _BUILD_CHAT_FINALIZATION_QUERY and FINISHED reply were persisted as Message rows on the DEBUG_BUILD conversation and surfaced in GET /console/api/agent/<agent_id>/chat-messages on refresh or failed Apply build-chat/finalize runs as a synchronous ephemeral BUILD_DRAFT turn with zero persisted Message / MessageAgentThought rows or session_snapshot writeback

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 verified the change and added or updated tests where meaningful regression risk justifies coverage.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and vp staged (frontend) to appease the lint gods

Execute POST /console/api/agent/<agent_id>/build-chat/finalize as a synchronous ephemeral BUILD_DRAFT turn so the internal consolidation prompt and FINISHED reply are never persisted to chat messages, binding session snapshots, or message-scoped traces.

Fixes DIFY-2675
@github-actions github-actions Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Nov 13, 2026
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 87.10% 87.12% +0.01%
Strict coverage 86.76% 86.78% +0.02%
Typed symbols 96,358 96,478 +120
Untyped symbols 14,323 14,322 -1
Modules 4647 4647 0

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-11-23 03:33:56.195301421 +0000
+++ /tmp/pyrefly_pr.txt	2026-11-23 03:33:38.587173197 +0000
@@ -3021,109 +3021,109 @@
 ERROR `(**kwargs: QueueNodeExceptionEvent | QueueNodeFailedEvent | QueueNodeSucceededEvent | str) -> Literal['failed']` is not assignable to attribute `workflow_node_finish_to_stream_response` with type `(*, event: QueueNodeExceptionEvent | QueueNodeFailedEvent | QueueNodeSucceededEvent, task_id: str) -> NodeFinishStreamResponse | None` [bad-assignment]
     --> tests/unit_tests/core/app/apps/advanced_chat/test_generate_task_pipeline.py:1292:89
 ERROR Argument `core.app.entities.app_invoke_entities.InvokeFrom` is not assignable to parameter `invoke_from` with type `models.enums.InvokeFrom | SQLCoreOperations[models.enums.InvokeFrom | None] | None` in function `models.model.Conversation.__init__` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:158:21
+   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:177:21
 ERROR Object of class `FunctionType` has no attribute `call_args` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:489:42
+   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:508:42
 ERROR Object of class `NoneType` has no attribute `message` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:690:12
+   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:709:12
 ERROR Object of class `NoneType` has no attribute `prompt_messages` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:695:23
+   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:714:23
 ERROR Argument `_FakeQueueManager` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.agent_app.app_generator.AgentAppGenerator._run_input_guards` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:713:31
+   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:732:31
 ERROR Argument `_FakeQueueManager` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.agent_app.app_generator.AgentAppGenerator._run_input_guards` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:734:31
+   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:753:31
 ERROR Argument `_FakeQueueManager` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.agent_app.app_generator.AgentAppGenerator._run_input_guards` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:752:31
+   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:771:31
 ERROR Argument `_FakeQueueManager` is not assignable to parameter `queue_manager` with type `AppQueueManager` in function `core.app.apps.agent_app.app_generator.AgentAppGenerator._run_input_guards` [bad-argument-type]
-   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:778:31
+   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:797:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:782:20
+   --> tests/unit_tests/core/app/apps/agent_app/test_app_generator.py:801:20
 ERROR Object of class `list` has no attribute `startswith` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:625:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:631:16
 ERROR Object of class `NoneType` has no attribute `kind` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:646:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:652:16
 ERROR `list[dict[str, str]]` is not assignable to attribute `dify_tools` with type `list[AgentSoulDifyToolConfig]` [bad-assignment]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:650:33
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:656:33
 ERROR `list[dict[str, str]]` is not assignable to attribute `dify_tools` with type `list[AgentSoulDifyToolConfig]` [bad-assignment]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:675:33
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:681:33
 ERROR `list[dict[str, str]]` is not assignable to attribute `dify_tools` with type `list[AgentSoulDifyToolConfig]` [bad-assignment]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:696:33
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:702:33
 ERROR Object of class `NoneType` has no attribute `plugin_id` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:717:9
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:723:9
 ERROR Object of class `NoneType` has no attribute `plugin_id` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:733:9
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:739:9
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:778:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:784:16
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:778:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:784:16
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:778:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:784:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:778:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:784:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:778:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:784:16
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:778:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:784:16
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:778:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:784:16
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:778:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:784:16
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:778:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:784:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:778:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:784:16
 ERROR Cannot index into `dict[str, JsonValue]` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:778:51
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:784:51
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:818:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:824:16
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:818:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:824:16
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:818:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:824:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:818:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:824:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:818:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:824:16
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:818:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:824:16
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:818:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:824:16
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:818:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:824:16
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:818:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:824:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:818:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:824:16
 ERROR Cannot index into `dict[str, JsonValue]` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:818:51
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:824:51
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:819:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:825:16
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:819:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:825:16
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:819:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:825:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:819:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:825:16
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:819:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:825:16
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:819:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:825:16
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:819:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:825:16
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:819:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:825:16
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:819:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:825:16
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:819:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:825:16
 ERROR Cannot index into `dict[str, JsonValue]` [bad-index]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:819:56
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:825:56
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:958:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:964:16
 ERROR Object of class `NoneType` has no attribute `kind` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:959:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:965:16
 ERROR Object of class `NoneType` has no attribute `writable` [missing-attribute]
-   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:960:16
+   --> tests/unit_tests/core/app/apps/agent_app/test_runtime_request_builder.py:966:16
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `ConversationStatus | SQLCoreOperations[ConversationStatus]` in function `models.model.Conversation.__init__` [bad-argument-type]
   --> tests/unit_tests/core/app/apps/chat/test_app_generator.py:94:16
 ERROR Argument `Literal[core.app.entities.app_invoke_entities.InvokeFrom.SERVICE_API]` is not assignable to parameter `invoke_from` with type `models.enums.InvokeFrom | SQLCoreOperations[models.enums.InvokeFrom | None] | None` in function `models.model.Conversation.__init__` [bad-argument-type]
@@ -4204,397 +4204,397 @@
 ERROR Class member `AgentMessageDeltaBackendClient._events` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:290:9
 ERROR Class member `FailingStreamBackendClient.stream_events` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:494:9
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:496:9
 ERROR Class member `FailingStreamBackendClient.cancel_run` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:505:9
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:508:9
 ERROR Class member `FailingStreamBackendClient.cancel_run_and_wait` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:509:9
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:512:9
 ERROR Class member `FailingAfterStartedStreamBackendClient.stream_events` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:521:9
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:525:9
 ERROR Class member `TerminalWithoutSnapshotBackendClient._events` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:538:9
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:543:9
 ERROR Class member `EmptyStreamBackendClient.stream_events` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:555:9
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:560:9
 ERROR Class member `GenericFailingStreamBackendClient.stream_events` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:568:9
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:574:9
 ERROR Class member `CancelFailingStreamBackendClient.cancel_run` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:581:9
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:588:9
 ERROR Argument `dict[str, str]` is not assignable to parameter `node_data` with type `DifyAgentNodeData` in function `core.workflow.nodes.agent_v2.agent_node.DifyAgentNode._extract_variable_selector_to_variable_mapping` [bad-argument-type]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:702:19
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:709:19
 ERROR Class member `_UnavailableParticipantStore.load_existing_node_execution_scope` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:878:13
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:885:13
 ERROR Class member `_FailingSessionStore.load_or_create_node_execution_session` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:1147:13
+    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:1154:13
 ERROR Attribute `graph_execution` of class `RuntimeState` is a read-only property and cannot be set [read-only]
-    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:1225:5
+    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:1232:5
 ERROR Object of class `NodeEventPayload` has no attribute `node_run_result` [missing-attribute]
-    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:1552:14
+    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:1559:14
 ERROR Class member `RetryingBackendClient._events` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:1609:13
+    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:1616:13
 ERROR `dict[str, int | str] | dict[str, str]` is not assignable to attribute `output_payload` with type `dict[str, object]` [bad-assignment]
-    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:1610:35
+    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:1617:35
 ERROR Object of class `NodeEventPayload` has no attribute `node_run_result` [missing-attribute]
-    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:1630:14
+    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:1637:14
 ERROR Object of class `NodeEventPayload` has no attribute `node_run_result` [missing-attribute]
-    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:1675:14
+    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:1682:14
 ERROR Argument `dict[str, dict[str, list[dict[str, str]] | Unknown]]` is not assignable to parameter `node_data` with type `DifyAgentNodeData` in function `core.workflow.nodes.agent_v2.agent_node.DifyAgentNode._extract_variable_selector_to_variable_mapping` [bad-argument-type]
-    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:1698:19
+    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_agent_node.py:1705:19
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:269:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:277:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:269:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:277:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:269:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:277:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:269:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:277:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:269:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:277:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:269:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:277:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:269:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:277:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:269:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:277:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:269:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:277:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:269:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:277:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:269:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:277:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:269:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:277:12
 ERROR `not in` is not supported between `Literal['region']` and `bool` [not-iterable]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:270:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:278:12
 ERROR `not in` is not supported between `Literal['region']` and `float` [not-iterable]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:270:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:278:12
 ERROR `not in` is not supported between `Literal['region']` and `int` [not-iterable]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:270:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:278:12
 ERROR `not in` is not supported between `Literal['region']` and `None` [not-iterable]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:270:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:278:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:357:19
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:365:19
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:357:19
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:365:19
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:357:19
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:365:19
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:357:19
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:365:19
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:357:19
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:365:19
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:357:19
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:365:19
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:358:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:366:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:358:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:366:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:358:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:366:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:358:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:366:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:358:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:366:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:358:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:366:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:358:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:366:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:358:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:366:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:358:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:366:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:358:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:366:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:358:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:366:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:358:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:366:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:358:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:366:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:358:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:366:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:358:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:366:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:358:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:366:12
 ERROR Cannot index into `dict[str, JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:358:33
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:366:33
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:12
 ERROR Cannot index into `dict[str, JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:359:33
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:367:33
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:12
 ERROR Cannot index into `dict[str, JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:360:33
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:368:33
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:388:20
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:396:20
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:388:20
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:396:20
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:388:20
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:396:20
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:388:20
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:396:20
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:388:20
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:396:20
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:388:20
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:396:20
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:389:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:397:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:389:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:397:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:389:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:397:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:389:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:397:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:389:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:397:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:389:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:397:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:12
 ERROR Cannot index into `dict[str, JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:390:43
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:398:43
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:426:20
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:434:20
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:426:20
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:434:20
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:426:20
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:434:20
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:426:20
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:434:20
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:426:20
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:434:20
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:426:20
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:434:20
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:427:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:435:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:427:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:435:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:427:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:435:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:427:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:435:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:427:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:435:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:427:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:435:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `str` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `bool` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `float` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `int` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `list[JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:12
 ERROR Cannot index into `dict[str, JsonValue]` [bad-index]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:428:43
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:436:43
 ERROR `not in` is not supported between `Literal['resource']` and `bool` [not-iterable]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:730:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:738:12
 ERROR `not in` is not supported between `Literal['resource']` and `float` [not-iterable]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:730:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:738:12
 ERROR `not in` is not supported between `Literal['resource']` and `int` [not-iterable]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:730:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:738:12
 ERROR `not in` is not supported between `Literal['resource']` and `None` [not-iterable]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:730:12
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:738:12
 ERROR `in` is not supported between `str` and `None` [not-iterable]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:791:16
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:799:16
 ERROR `in` is not supported between `str` and `None` [not-iterable]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:792:16
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:800:16
 ERROR `in` is not supported between `str` and `None` [not-iterable]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:794:20
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:802:20
 ERROR `not in` is not supported between `Literal['resource']` and `bool` [not-iterable]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:795:16
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:803:16
 ERROR `not in` is not supported between `Literal['resource']` and `float` [not-iterable]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:795:16
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:803:16
 ERROR `not in` is not supported between `Literal['resource']` and `int` [not-iterable]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:795:16
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:803:16
 ERROR `not in` is not supported between `Literal['resource']` and `None` [not-iterable]
-   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:795:16
+   --> tests/unit_tests/core/workflow/nodes/agent_v2/test_dify_tools_builder.py:803:16
 ERROR Cannot index into `object` [bad-index]
    --> tests/unit_tests/core/workflow/nodes/agent_v2/test_runtime_request_builder.py:360:18
 ERROR Argument `test_single_step_loads_variables_referenced_only_by_knowledge_filters.DraftVariableLoader` is not assignable to parameter `variable_loader` with type `VariableLoader` in function `core.workflow.workflow_entry.WorkflowEntry.single_step_run` [bad-argument-type]

@codecov

codecov Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.44444% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.40%. Comparing base (f5cae55) to head (7519da6).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
api/core/app/apps/agent_app/app_runner.py 90.00% 2 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #46218      +/-   ##
==========================================
+ Coverage   90.31%   90.40%   +0.08%     
==========================================
  Files        6496     6394     -102     
  Lines      408541   404596    -3945     
  Branches    81968    80419    -1549     
==========================================
- Hits       368979   365774    -3205     
+ Misses      33158    32419     -739     
+ Partials     6404     6403       -1     
Flag Coverage Δ
api 90.14% <94.44%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@BeautyyuYanli
BeautyyuYanli marked this pull request as ready for review November 13, 2026 05:27
@BeautyyuYanli
BeautyyuYanli requested a review from a team November 20, 2026 04:59
…-issue

# Conflicts:
#	dify-agent/src/dify_agent/client/_client.py
#	dify-agent/tests/local/dify_agent/client/test_client.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant