Skip to content

feat(api): support explicit TLS for Milvus vector store#36265

Merged
fatelei merged 1 commit into
langgenius:mainfrom
amr-sheriff:feat/milvus-tls-support
May 27, 2026
Merged

feat(api): support explicit TLS for Milvus vector store#36265
fatelei merged 1 commit into
langgenius:mainfrom
amr-sheriff:feat/milvus-tls-support

Conversation

@amr-sheriff
Copy link
Copy Markdown
Contributor

@amr-sheriff amr-sheriff commented May 17, 2026

Summary

Fixes 36262

Milvus vector store integration only forwards uri, token, user, password, and db_name to pymilvus client. There is no way to configure one-way TLS with an explicit server certificate.

Adds explicit one-way TLS configuration for the Milvus vector store. Three new environment variables are passed to pymilvus.MilvusClient:

Env var Type Purpose
MILVUS_SECURE bool Enable TLS; equivalent to secure=True in pymilvus
MILVUS_SERVER_PEM_PATH str Filesystem path to the Milvus server cert (PEM)
MILVUS_SERVER_NAME str Server name / SNI to verify against the certificate

When MILVUS_SECURE is false (the default), no additional kwargs are passed, so existing behavior is unaffected.

Changes

  • api/configs/middleware/vdb/milvus_config.py, adds the three settings fields.
  • api/providers/vdb/vdb-milvus/src/dify_vdb_milvus/milvus_vector.py, extends MilvusConfig, refactors _init_client() to build kwargs and merge TLS args only when secure, and threads the new env vars through MilvusVectorFactory.
  • api/providers/vdb/vdb-milvus/tests/unit_tests/test_milvus.py, two new tests covering the secure and non-secure paths.

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 make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 17, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-05-27 03:48:09.448953333 +0000
+++ /tmp/pyrefly_pr.txt	2026-05-27 03:47:53.545882079 +0000
@@ -1,7 +1,9 @@
 ERROR `str` is not assignable to `Literal['advanced-chat', 'agent-chat', 'all', 'channel', 'chat', 'completion', 'workflow']` [bad-assignment]
   --> controllers/console/app/app.py:69:104
+ERROR Object of class `App` has no attribute `access_mode` [missing-attribute]
+   --> controllers/console/app/app.py:583:13
 ERROR Argument `str | None` is not assignable to parameter `language` with type `str` in function `services.account_service.AccountService.send_email_register_email` [bad-argument-type]
-  --> controllers/console/auth/email_register.py:86:108
+  --> controllers/console/auth/email_register.py:83:108
 ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
   --> controllers/console/init_validate.py:31:2
 ERROR Object of class `MissingRouter` has no attribute `post` [missing-attribute]
@@ -18,7 +20,7 @@
   --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:75:5
 ERROR `+=` is not supported between `list[PromptMessageContentUnionTypes]` and `str` [unsupported-operation]
    --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:324:37
-ERROR Argument `list[dict[str, list[dict[Unknown, Unknown]] | str]]` is not assignable to parameter `value` with type `SQLCoreOperations[dict[str, Any]] | dict[str, Any]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
+ERROR Argument `list[Unknown]` is not assignable to parameter `value` with type `SQLCoreOperations[dict[str, Any]] | dict[str, Any]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:392:27
 ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, int], stream=Literal[False]) [no-matching-overload]
    --> core/llm_generator/llm_generator.py:113:60
@@ -40,8 +42,6 @@
    --> core/llm_generator/llm_generator.py:653:60
 ERROR Class member `OpsTraceProviderConfigMap.__getitem__` overrides parent class `UserDict` in an inconsistent manner [bad-override-param-name]
    --> core/ops/ops_trace_manager.py:218:9
-ERROR `list[dict[str, str | dict[str, str]]] | list[Unknown]` is not assignable to TypedDict key `tool_calls` with type `list[dict[str, str]] | str` [bad-typed-dict-key]
-  --> core/prompt/utils/prompt_message_util.py:83:44
 ERROR Argument `Unknown | None` is not assignable to parameter `result_object` with type `dict[str, Any]` in function `WaterCrawlProvider._structure_data` [bad-argument-type]
    --> core/rag/extractor/watercrawl/provider.py:108:37
 ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
@@ -58,32 +58,14 @@
    --> core/rag/index_processor/processor/qa_index_processor.py:208:33
 ERROR Object of class `Document` has no attribute `score` [missing-attribute]
    --> core/rag/index_processor/processor/qa_index_processor.py:209:16
-ERROR Argument `DatasetMultiRetrieverTool` is not assignable to parameter `object` with type `DatasetRetrieverTool` in function `list.append` [bad-argument-type]
-    --> core/rag/retrieval/dataset_retrieval.py:1241:26
-ERROR Returned type `list[DatasetRetrieverTool]` is not assignable to declared return type `list[DatasetRetrieverBaseTool] | None` [bad-return]
-    --> core/rag/retrieval/dataset_retrieval.py:1243:16
 ERROR Class member `MCPToolProviderController.entity` overrides parent class `ToolProviderController` in an inconsistent manner [bad-override-mutable-attribute]
   --> core/tools/mcp_tool/provider.py:33:14
 ERROR Class member `PluginToolProviderController.entity` overrides parent class `BuiltinToolProviderController` in an inconsistent manner [bad-override-mutable-attribute]
   --> core/tools/plugin_tool/provider.py:12:5
-ERROR Cannot set item in `dict[str, dict[str, Any]]` [unsupported-operation]
-    --> core/tools/tool_manager.py:1108:58
 ERROR `(method: str, url: str, max_retries: int = ..., **kwargs: Any) -> httpx._models.Response` is not assignable to attribute `perform_request` with type `(self: CloudScraper, method: Unknown, url: Unknown, *args: Unknown, **kwargs: Unknown) -> requests.models.Response` [bad-assignment]
   --> core/tools/utils/web_reader_tool.py:66:35
 ERROR `list[Never]` is not assignable to attribute `tools` with type `Never` [bad-assignment]
    --> core/tools/workflow_as_tool/provider.py:238:26
-ERROR Cannot set item in `dict[str, dict[str, crontab | str]]` [unsupported-operation]
-   --> extensions/ext_celery.py:176:63
-ERROR Cannot set item in `dict[str, dict[str, crontab | str]]` [unsupported-operation]
-   --> extensions/ext_celery.py:194:51
-ERROR Cannot set item in `dict[str, dict[str, crontab | str]]` [unsupported-operation]
-   --> extensions/ext_celery.py:200:53
-ERROR Cannot set item in `dict[str, dict[str, crontab | str]]` [unsupported-operation]
-   --> extensions/ext_celery.py:233:51
-ERROR Cannot set item in `dict[str, dict[str, crontab | str]]` [unsupported-operation]
-   --> extensions/ext_celery.py:239:53
-ERROR Cannot set item in `dict[str, dict[str, crontab | str]]` [unsupported-operation]
-   --> extensions/ext_celery.py:246:61
 ERROR Cannot index into `Literal['']` [bad-index]
   --> extensions/storage/huawei_obs_storage.py:27:23
 ERROR Cannot index into `Literal['']` [bad-index]
@@ -220,8 +202,6 @@
   --> providers/vdb/vdb-elasticsearch/tests/unit_tests/test_elasticsearch_vector.py:35:5
 ERROR Object of class `ModuleType` has no attribute `ConnectionError` [missing-attribute]
   --> providers/vdb/vdb-elasticsearch/tests/unit_tests/test_elasticsearch_vector.py:36:5
-ERROR Argument `tuple[Any, Any, Any, Any, float]` is not assignable to parameter `object` with type `tuple[float, Any, Any, Any]` in function `list.append` [bad-argument-type]
-  --> providers/vdb/vdb-hologres/tests/integration_tests/conftest.py:56:32
 ERROR Object of class `ModuleType` has no attribute `BaseQuantizationType` [missing-attribute]
   --> providers/vdb/vdb-hologres/tests/unit_tests/test_hologres_vector.py:18:5
 ERROR Object of class `ModuleType` has no attribute `DistanceType` [missing-attribute]
@@ -555,9 +535,7 @@
 ERROR No matching overload found for function `redis.client.Redis.__init__` called with arguments: (host=int | str | Unknown, port=int | str | Unknown, password=int | str | Unknown | None, db=int, ssl=bool, ssl_ca_certs=str | None, ssl_cert_reqs=Any | None, ssl_certfile=Any | None, ssl_keyfile=Any | None, socket_timeout=Literal[5], socket_connect_timeout=Literal[5], health_check_interval=Literal[30]) [no-matching-overload]
   --> schedule/queue_monitor_task.py:14:21
 ERROR Object of class `Tenant` has no attribute `role` [missing-attribute]
-    --> services/account_service.py:1383:13
-ERROR `+` is not supported between `str` and `dict[Unknown, Unknown]` [unsupported-operation]
-   --> services/app_service.py:519:53
+    --> services/account_service.py:1179:13
 ERROR No matching overload found for function `flask.helpers.stream_with_context` called with arguments: (Generator[bytes]) [no-matching-overload]
    --> services/audio_service.py:144:56
 ERROR No matching overload found for function `flask.helpers.stream_with_context` called with arguments: (Generator[bytes]) [no-matching-overload]
@@ -565,11 +543,11 @@
 ERROR Argument `str | None` is not assignable to parameter `value` with type `SQLCoreOperations[str] | str` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
    --> services/conversation_service.py:131:33
 ERROR `dict[str, dict[str, Any] | str | None]` is not assignable to variable `data_source_info` with type `dict[str, bool | str]` [bad-assignment]
-    --> services/dataset_service.py:2232:56
+    --> services/dataset_service.py:2202:56
 ERROR `dict[str, dict[str, Any] | str | None]` is not assignable to variable `data_source_info` with type `dict[str, bool | str]` [bad-assignment]
-    --> services/dataset_service.py:2745:44
+    --> services/dataset_service.py:2715:44
 ERROR `None` is not assignable to attribute `rules` with type `Never` [bad-assignment]
-    --> services/dataset_service.py:2920:51
+    --> services/dataset_service.py:2890:51
 ERROR Class member `DocumentIndexingTaskProxy.NORMAL_TASK_FUNC` overrides parent class `BatchDocumentIndexingProxy` in an inconsistent manner [bad-override]
   --> services/document_indexing_proxy/document_indexing_task_proxy.py:11:5
 ERROR Class member `DocumentIndexingTaskProxy.PRIORITY_TASK_FUNC` overrides parent class `BatchDocumentIndexingProxy` in an inconsistent manner [bad-override]
@@ -579,7 +557,7 @@
 ERROR Class member `DuplicateDocumentIndexingTaskProxy.PRIORITY_TASK_FUNC` overrides parent class `BatchDocumentIndexingProxy` in an inconsistent manner [bad-override]
   --> services/document_indexing_proxy/duplicate_document_indexing_task_proxy.py:15:5
 ERROR `handled_tenant_count` was assigned in the current scope before the nonlocal declaration [unknown-name]
-  --> services/plugin/plugin_migration.py:93:34
+  --> services/plugin/plugin_migration.py:92:34
 ERROR `dict[str, Any]` is not assignable to attribute `credentials` with type `Never` [bad-assignment]
    --> services/trigger/trigger_provider_service.py:487:40
 ERROR `int` is not assignable to attribute `credential_expires_at` with type `Never` [bad-assignment]
@@ -592,84 +570,6 @@
    --> tasks/regenerate_summary_index_task.py:277:60
 ERROR Class member `AsyncWorkflowCFSPlanScheduler.plan` overrides parent class `CFSPlanScheduler` in an inconsistent manner [bad-override-mutable-attribute]
   --> tasks/workflow_cfs_scheduler/cfs_scheduler.py:19:5
-ERROR Object of class `FromClause` has no attribute `metadata` [missing-attribute]
-  --> tests/helpers/legacy_model_type_migration.py:64:16
-ERROR Object of class `FromClause` has no attribute `metadata` [missing-attribute]
-  --> tests/helpers/legacy_model_type_migration.py:80:16
-ERROR Argument `dict[_KeyType, Any]` is not assignable to parameter `object` with type `dict[str, object]` in function `list.append` [bad-argument-type]
-   --> tests/helpers/legacy_model_type_migration.py:138:23
-ERROR Object of class `FromClause` has no attribute `insert` [missing-attribute]
-   --> tests/helpers/legacy_model_type_migration.py:182:13
-ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
-  --> tests/integration_tests/controllers/openapi/conftest.py:35:43
-ERROR Argument `Literal['owner']` is not assignable to parameter `role` with type `SQLCoreOperations[TenantAccountRole] | TenantAccountRole` in function `models.account.TenantAccountJoin.__init__` [bad-argument-type]
-  --> tests/integration_tests/controllers/openapi/conftest.py:40:83
-ERROR `None` is not subscriptable [unsupported-operation]
-  --> tests/integration_tests/controllers/openapi/test_apps.py:45:12
-ERROR `None` is not subscriptable [unsupported-operation]
-  --> tests/integration_tests/controllers/openapi/test_apps.py:46:12
-ERROR `None` is not subscriptable [unsupported-operation]
-  --> tests/integration_tests/controllers/openapi/test_apps.py:47:23
-ERROR `None` is not subscriptable [unsupported-operation]
-  --> tests/integration_tests/controllers/openapi/test_apps.py:61:12
-ERROR `None` is not subscriptable [unsupported-operation]
-  --> tests/integration_tests/controllers/openapi/test_apps.py:62:12
-ERROR `None` is not subscriptable [unsupported-operation]
-  --> tests/integration_tests/controllers/openapi/test_apps.py:63:12
-ERROR `None` is not subscriptable [unsupported-operation]
-  --> tests/integration_tests/controllers/openapi/test_apps.py:78:12
-ERROR `None` is not subscriptable [unsupported-operation]
-  --> tests/integration_tests/controllers/openapi/test_apps.py:79:12
-ERROR `None` is not subscriptable [unsupported-operation]
-  --> tests/integration_tests/controllers/openapi/test_apps.py:80:12
-ERROR `None` is not subscriptable [unsupported-operation]
-  --> tests/integration_tests/controllers/openapi/test_apps.py:94:12
-ERROR `None` is not subscriptable [unsupported-operation]
-  --> tests/integration_tests/controllers/openapi/test_apps.py:95:12
-ERROR `None` is not subscriptable [unsupported-operation]
-  --> tests/integration_tests/controllers/openapi/test_apps.py:96:12
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/integration_tests/controllers/openapi/test_apps.py:110:12
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/integration_tests/controllers/openapi/test_apps.py:111:12
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/integration_tests/controllers/openapi/test_apps.py:112:12
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/integration_tests/controllers/openapi/test_apps.py:126:12
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/integration_tests/controllers/openapi/test_apps.py:127:12
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/integration_tests/controllers/openapi/test_apps.py:128:12
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/integration_tests/controllers/openapi/test_apps.py:168:12
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/integration_tests/controllers/openapi/test_apps.py:169:12
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/integration_tests/controllers/openapi/test_apps.py:170:12
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/integration_tests/controllers/openapi/test_apps.py:171:56
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/integration_tests/controllers/openapi/test_apps.py:191:12
-ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/integration_tests/controllers/openapi/test_apps.py:202:23
-ERROR `in` is not supported between `Literal['page']` and `None` [not-iterable]
-   --> tests/integration_tests/controllers/openapi/test_apps.py:203:12
-ERROR `in` is not supported between `Literal['limit']` and `None` [not-iterable]
-   --> tests/integration_tests/controllers/openapi/test_apps.py:204:12
-ERROR `in` is not supported between `Literal['total']` and `None` [not-iterable]
-   --> tests/integration_tests/controllers/openapi/test_apps.py:205:12
-ERROR `in` is not supported between `Literal['has_more']` and `None` [not-iterable]
-   --> tests/integration_tests/controllers/openapi/test_apps.py:206:12
-ERROR `not in` is not supported between `Literal['sessions']` and `None` [not-iterable]
-   --> tests/integration_tests/controllers/openapi/test_apps.py:210:12
-ERROR `None` is not subscriptable [unsupported-operation]
-  --> tests/integration_tests/controllers/openapi/test_auth.py:29:12
-ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
-  --> tests/integration_tests/controllers/openapi/test_auth.py:36:52
-ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-  --> tests/integration_tests/controllers/openapi/test_auth.py:66:12
-ERROR Object of class `NoneType` has no attribute `get` [missing-attribute]
-  --> tests/integration_tests/controllers/openapi/test_auth.py:91:12
 ERROR Argument `_GP` is not assignable to parameter `graph_init_params` with type `GraphInitParams` in function `core.workflow.nodes.datasource.datasource_node.DatasourceNode.__init__` [bad-argument-type]
   --> tests/integration_tests/core/workflow/nodes/datasource/test_datasource_node_integration.py:85:27
 ERROR Argument `_GS` is not assignable to parameter `graph_runtime_state` with type `GraphRuntimeState` in function `core.workflow.nodes.datasource.datasource_node.DatasourceNode.__init__` [bad-argument-type]
@@ -684,26 +584,6 @@
    --> tests/integration_tests/model_runtime/__mock/plugin_model.py:235:9
 ERROR `unpatch` may be uninitialized [unbound-name]
   --> tests/integration_tests/plugin/__mock/http.py:67:9
-ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
-   --> tests/integration_tests/services/test_node_output_inspector_service.py:231:59
-ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
-   --> tests/integration_tests/services/test_node_output_inspector_service.py:257:59
-ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
-   --> tests/integration_tests/services/test_node_output_inspector_service.py:267:59
-ERROR Argument `SimpleNamespace` is not assignable to parameter `app_model` with type `App` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.snapshot_workflow_run` [bad-argument-type]
-   --> tests/integration_tests/services/test_node_output_inspector_service.py:269:49
-ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
-   --> tests/integration_tests/services/test_node_output_inspector_service.py:287:63
-ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
-   --> tests/integration_tests/services/test_node_output_inspector_service.py:330:63
-ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
-   --> tests/integration_tests/services/test_node_output_inspector_service.py:371:63
-ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
-   --> tests/integration_tests/services/test_node_output_inspector_service.py:393:59
-ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
-   --> tests/integration_tests/services/test_node_output_inspector_service.py:419:59
-ERROR Argument `_stub_resolver._Resolver` is not assignable to parameter `binding_resolver` with type `WorkflowAgentBindingResolver | None` in function `services.workflow.node_output_inspector_service.NodeOutputInspectorService.__init__` [bad-argument-type]
-   --> tests/integration_tests/services/test_node_output_inspector_service.py:468:63
 ERROR Object of class `TestWorkflowDraftVariableServiceResetVariable` has no attribute `_test_user_id` [missing-attribute]
    --> tests/integration_tests/services/test_workflow_draft_variable_service.py:621:21
 ERROR Object of class `TestWorkflowDraftVariableServiceResetVariable` has no attribute `_test_user_id` [missing-attribute]
@@ -731,15 +611,21 @@
 ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `page` [bad-argument-type]
    --> tests/test_containers_integration_tests/controllers/console/app/test_app_apis.py:700:51
 ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
-   --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:247:9
+   --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:245:9
 ERROR Object of class `RequestError` has no attribute `response` [missing-attribute]
-   --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:248:9
+   --> tests/test_containers_integration_tests/controllers/console/auth/test_oauth.py:246:9
 ERROR `SimpleNamespace` is not assignable to attribute `mcp_ns` with type `Namespace` [bad-assignment]
   --> tests/test_containers_integration_tests/controllers/mcp/test_mcp.py:27:21
 ERROR Attribute `payload` of class `Namespace` is a read-only property and cannot be set [read-only]
   --> tests/test_containers_integration_tests/controllers/mcp/test_mcp.py:31:5
 ERROR Argument `DummyServer` is not assignable to parameter `mcp_server` with type `AppMCPServer` in function `controllers.mcp.mcp.MCPAppApi._validate_server_status` [bad-argument-type]
    --> tests/test_containers_integration_tests/controllers/mcp/test_mcp.py:460:37
+ERROR Argument `list[dict[str, str]] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
+   --> tests/test_containers_integration_tests/controllers/service_api/dataset/test_dataset.py:119:20
+ERROR Missing argument `tag_id` in function `controllers.service_api.dataset.dataset.TagUpdatePayload.__init__` [missing-argument]
+   --> tests/test_containers_integration_tests/controllers/service_api/dataset/test_dataset.py:184:29
+ERROR Missing argument `tag_id` in function `controllers.service_api.dataset.dataset.TagDeletePayload.__init__` [missing-argument]
+   --> tests/test_containers_integration_tests/controllers/service_api/dataset/test_dataset.py:196:29
 ERROR `in` is not supported between `Literal['webapp-logo']` and `None` [not-iterable]
    --> tests/test_containers_integration_tests/controllers/web/test_site.py:133:16
 ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
@@ -841,9 +727,9 @@
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
    --> tests/test_containers_integration_tests/core/rag/retrieval/test_dataset_retrieval_integration.py:587:23
 ERROR Argument `Connection | Engine` is not assignable to parameter `session_factory` with type `Engine | sessionmaker[Unknown]` in function `core.repositories.sqlalchemy_workflow_execution_repository.SQLAlchemyWorkflowExecutionRepository.__init__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:265:29
+   --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:264:29
 ERROR Argument `Connection | Engine` is not assignable to parameter `session_factory` with type `Engine | sessionmaker[Unknown]` in function `core.repositories.sqlalchemy_workflow_node_execution_repository.SQLAlchemyWorkflowNodeExecutionRepository.__init__` [bad-argument-type]
-   --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:271:29
+   --> tests/test_containers_integration_tests/core/workflow/test_human_input_resume_node_execution.py:270:29
 ERROR Argument `Literal['owner']` is not assignable to parameter `role` with type `SQLCoreOperations[TenantAccountRole] | TenantAccountRole` in function `models.account.TenantAccountJoin.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/helpers/execution_extra_content.py:48:14
 ERROR Returned type `int | str` is not assignable to declared return type `str` [bad-return]
@@ -887,15 +773,17 @@
 ERROR Generator function should return `Generator` [bad-return]
   --> tests/test_containers_integration_tests/repositories/test_workflow_run_repository.py:89:56
 ERROR `None` is not subscriptable [unsupported-operation]
-   --> tests/test_containers_integration_tests/services/auth/test_api_key_auth_service.py:191:16
-ERROR Could not find name `Session` [unknown-name]
-  --> tests/test_containers_integration_tests/services/plugin/test_plugin_parameter_service.py:54:37
-ERROR Could not find name `Session` [unknown-name]
-  --> tests/test_containers_integration_tests/services/plugin/test_plugin_parameter_service.py:96:37
+   --> tests/test_containers_integration_tests/services/auth/test_api_key_auth_service.py:190:16
+ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
+  --> tests/test_containers_integration_tests/services/dataset_service_update_delete.py:41:20
+ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
+  --> tests/test_containers_integration_tests/services/dataset_service_update_delete.py:47:62
 ERROR Object of class `NoneType` has no attribute `version` [missing-attribute]
-  --> tests/test_containers_integration_tests/services/plugin/test_plugin_service.py:53:16
+  --> tests/test_containers_integration_tests/services/plugin/test_plugin_service.py:50:16
 ERROR Object of class `NoneType` has no attribute `version` [missing-attribute]
-  --> tests/test_containers_integration_tests/services/plugin/test_plugin_service.py:71:16
+  --> tests/test_containers_integration_tests/services/plugin/test_plugin_service.py:68:16
+ERROR Argument `Literal['custom']` is not assignable to parameter `preferred_provider_type` with type `ProviderType | SQLCoreOperations[ProviderType]` in function `models.provider.TenantPreferredModelProvider.__init__` [bad-argument-type]
+   --> tests/test_containers_integration_tests/services/plugin/test_plugin_service.py:377:37
 ERROR Object of class `NoneType` has no attribute `open_id` [missing-attribute]
    --> tests/test_containers_integration_tests/services/test_account_service.py:530:16
 ERROR Object of class `Tenant` has no attribute `role` [missing-attribute]
@@ -926,6 +814,10 @@
    --> tests/test_containers_integration_tests/services/test_advanced_prompt_template_service.py:894:63
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
    --> tests/test_containers_integration_tests/services/test_agent_service.py:134:38
+ERROR `str` is not assignable to attribute `agent_mode` with type `Never` [bad-assignment]
+   --> tests/test_containers_integration_tests/services/test_agent_service.py:138:47
+ERROR Argument `Literal['account']` is not assignable to parameter `created_by_role` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
+   --> tests/test_containers_integration_tests/services/test_agent_service.py:275:29
 ERROR Argument `str | None` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
    --> tests/test_containers_integration_tests/services/test_agent_service.py:565:24
 ERROR Argument `str | None` is not assignable to parameter `created_by` with type `SQLCoreOperations[str] | str` in function `models.model.MessageAgentThought.__init__` [bad-argument-type]
@@ -965,7 +857,7 @@
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
    --> tests/test_containers_integration_tests/services/test_api_based_extension_service.py:527:57
 ERROR Argument `Literal['app']` is not assignable to parameter `value` with type `ApiTokenType | SQLCoreOperations[ApiTokenType]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
-  --> tests/test_containers_integration_tests/services/test_api_token_service.py:28:26
+  --> tests/test_containers_integration_tests/services/test_api_token_service.py:27:26
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
    --> tests/test_containers_integration_tests/services/test_app_dsl_service.py:161:42
 ERROR Argument `Literal['simple']` is not assignable to parameter `prompt_type` with type `PromptType | SQLCoreOperations[PromptType]` in function `models.model.AppModelConfig.__init__` [bad-argument-type]
@@ -1126,62 +1018,6 @@
   --> tests/test_containers_integration_tests/services/test_dataset_service_permissions.py:40:58
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/services/test_dataset_service_permissions.py:67:20
-ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_feature_service.py:128:20
-ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_feature_service.py:129:20
-ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_feature_service.py:208:16
-ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_feature_service.py:209:16
-ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_feature_service.py:490:20
-ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_feature_service.py:491:20
-ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_feature_service.py:587:20
-ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_feature_service.py:588:20
-ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_feature_service.py:694:20
-ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_feature_service.py:695:20
-ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_feature_service.py:746:16
-ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_feature_service.py:747:16
-ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_feature_service.py:800:16
-ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_feature_service.py:801:16
-ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_feature_service.py:923:16
-ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_feature_service.py:924:16
-ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
-    --> tests/test_containers_integration_tests/services/test_feature_service.py:1253:16
-ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
-    --> tests/test_containers_integration_tests/services/test_feature_service.py:1254:16
-ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
-    --> tests/test_containers_integration_tests/services/test_feature_service.py:1364:20
-ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
-    --> tests/test_containers_integration_tests/services/test_feature_service.py:1365:20
-ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
-    --> tests/test_containers_integration_tests/services/test_feature_service.py:1565:16
-ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
-    --> tests/test_containers_integration_tests/services/test_feature_service.py:1566:16
-ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
-    --> tests/test_containers_integration_tests/services/test_feature_service.py:1686:16
-ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
-    --> tests/test_containers_integration_tests/services/test_feature_service.py:1687:16
-ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
-    --> tests/test_containers_integration_tests/services/test_feature_service.py:1751:16
-ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
-    --> tests/test_containers_integration_tests/services/test_feature_service.py:1752:16
-ERROR Object of class `NoneType` has no attribute `size` [missing-attribute]
-    --> tests/test_containers_integration_tests/services/test_feature_service.py:1866:16
-ERROR Object of class `NoneType` has no attribute `limit` [missing-attribute]
-    --> tests/test_containers_integration_tests/services/test_feature_service.py:1867:16
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/services/test_file_service.py:69:20
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
@@ -1189,7 +1025,7 @@
 ERROR Argument `Literal['owner']` is not assignable to parameter `role` with type `SQLCoreOperations[TenantAccountRole] | TenantAccountRole` in function `models.account.TenantAccountJoin.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/services/test_human_input_delivery_test.py:32:18
 ERROR Unexpected keyword argument `whole_workspace` in function `core.workflow.human_input_adapter.EmailRecipients.__init__` [unexpected-keyword]
-   --> tests/test_containers_integration_tests/services/test_human_input_delivery_test_service.py:241:44
+   --> tests/test_containers_integration_tests/services/test_human_input_delivery_test_service.py:240:44
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/services/test_message_export_service.py:53:20
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
@@ -1208,20 +1044,6 @@
    --> tests/test_containers_integration_tests/services/test_messages_clean_service.py:263:29
 ERROR Argument `Literal['end_user']` is not assignable to parameter `created_by_role` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `models.web.SavedMessage.__init__` [bad-argument-type]
    --> tests/test_containers_integration_tests/services/test_messages_clean_service.py:272:29
-ERROR Object of class `str` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_messages_clean_service.py:628:13
-ERROR Object of class `str` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_messages_clean_service.py:632:13
-ERROR Object of class `str` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_messages_clean_service.py:946:13
-ERROR Object of class `str` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_messages_clean_service.py:950:13
-ERROR Object of class `str` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_messages_clean_service.py:954:13
-ERROR Object of class `str` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_messages_clean_service.py:961:22
-ERROR Object of class `str` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_messages_clean_service.py:961:52
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/services/test_metadata_service.py:56:20
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
@@ -1323,39 +1145,39 @@
 ERROR Argument `Literal['app']` is not assignable to parameter `type` with type `SQLCoreOperations[TagType] | TagType` in function `models.model.Tag.__init__` [bad-argument-type]
    --> tests/test_containers_integration_tests/services/test_tag_service.py:364:18
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:171:13
+   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:169:13
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:200:23
+   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:198:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:211:61
+   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:209:61
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:234:23
+   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:232:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:244:23
+   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:242:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:271:13
+   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:269:13
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:296:23
+   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:294:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:330:13
+   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:328:13
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:355:23
+   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:353:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:389:13
+   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:387:13
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:414:23
+   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:412:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:448:13
+   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:446:13
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:468:27
+   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:466:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:499:27
+   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:497:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:526:13
+   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:524:13
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:538:13
+   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:535:13
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:559:27
+   --> tests/test_containers_integration_tests/services/test_trigger_provider_service.py:555:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
   --> tests/test_containers_integration_tests/services/test_web_conversation_service.py:92:38
 ERROR Argument `Literal['account']` is not assignable to parameter `created_by_role` with type `CreatorUserRole | SQLCoreOperations[CreatorUserRole]` in function `models.web.PinnedConversation.__init__` [bad-argument-type]
@@ -1728,10 +1550,6 @@
    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:788:32
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:832:27
-ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:850:27
-ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:871:31
 ERROR `>=` is not supported between `None` and `Literal[3]` [unsupported-operation]
    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:890:16
 ERROR `>=` is not supported between `None` and `Literal[9]` [unsupported-operation]
@@ -1784,10 +1602,6 @@
   --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:73:21
 ERROR Object of class `Account` has no attribute `tenant_id` [missing-attribute]
    --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:101:23
-ERROR `str | None` is not assignable to upper bound `SupportsDunderGT[Any] | SupportsDunderLT[Any]` of type variable `SupportsRichComparisonT` [bad-specialization]
-   --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:295:57
-ERROR `str | None` is not assignable to upper bound `SupportsDunderGT[Any] | SupportsDunderLT[Any]` of type variable `SupportsRichComparisonT` [bad-specialization]
-   --> tests/test_containers_integration_tests/tasks/test_disable_segments_from_index_task.py:724:57
 ERROR Object of class `NoneType` has no attribute `indexing_status` [missing-attribute]
    --> tests/test_containers_integration_tests/tasks/test_document_indexing_task.py:258:20
 ERROR Object of class `NoneType` has no attribute `processing_started_at` [missing-attribute]
@@ -1960,23 +1774,6 @@
    --> tests/test_containers_integration_tests/trigger/test_trigger_e2e.py:857:21
 ERROR Argument `Literal['unsupported_language']` is not assignable to parameter `language` with type `CodeLanguage` in function `core.helper.code_executor.code_executor.CodeExecutor.execute_workflow_code_template` [bad-argument-type]
   --> tests/test_containers_integration_tests/workflow/nodes/code_executor/test_code_executor.py:10:62
-ERROR Cannot index into `bool` [bad-index]
-  --> tests/unit_tests/clients/agent_backend/test_event_adapter.py:53:12
-ERROR Cannot index into `float` [bad-index]
-  --> tests/unit_tests/clients/agent_backend/test_event_adapter.py:53:12
-ERROR Cannot index into `int` [bad-index]
-  --> tests/unit_tests/clients/agent_backend/test_event_adapter.py:53:12
-ERROR Cannot index into `list[JsonValue]` [bad-index]
-  --> tests/unit_tests/clients/agent_backend/test_event_adapter.py:53:12
-ERROR Cannot index into `str` [bad-index]
-  --> tests/unit_tests/clients/agent_backend/test_event_adapter.py:53:12
-ERROR `None` is not subscriptable [unsupported-operation]
-  --> tests/unit_tests/clients/agent_backend/test_event_adapter.py:53:12
-ERROR Object of class `LayerConfig` has no attribute `user_id`
-ERROR Object of class `LayerConfig` has no attribute `plugin_id`
-ERROR Object of class `LayerConfig` has no attribute `tools`
-ERROR Cannot index into `object` [bad-index]
-   --> tests/unit_tests/clients/agent_backend/test_request_builder.py:164:12
 ERROR Expected a callable, got `None` [not-callable]
   --> tests/unit_tests/commands/test_clean_expired_messages.py:33:9
 ERROR Expected a callable, got `None` [not-callable]
@@ -1985,30 +1782,6 @@
   --> tests/unit_tests/commands/test_clean_expired_messages.py:94:9
 ERROR Expected a callable, got `None` [not-callable]
    --> tests/unit_tests/commands/test_clean_expired_messages.py:176:9
-ERROR Generator function should return `Generator` [bad-return]
-  --> tests/unit_tests/commands/test_legacy_model_type_migration.py:36:38
-ERROR Object of class `FromClause` has no attribute `insert` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:204:13
-ERROR Object of class `object` has no attribute `callback` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:383:5
-ERROR Object of class `object` has no attribute `callback` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:444:5
-ERROR Object of class `TextIOBase` has no attribute `name` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:457:17
-ERROR Class `object` has no class attribute `__table__` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:541:48
-ERROR Class `object` has no class attribute `__table__` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:620:48
-ERROR Class `object` has no class attribute `__table__` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:723:48
-ERROR Class `object` has no class attribute `__table__` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:801:48
-ERROR Class `object` has no class attribute `__table__` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:856:42
-ERROR Argument `object` is not assignable to parameter `orig` with type `BaseException` in function `sqlalchemy.exc.DBAPIError.__init__` [bad-argument-type]
-    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1226:44
-ERROR Argument `SimpleNamespace` is not assignable to parameter `orig` with type `BaseException` in function `sqlalchemy.exc.DBAPIError.__init__` [bad-argument-type]
-    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1250:57
 ERROR Expected a callable, got `None` [not-callable]
   --> tests/unit_tests/commands/test_reset_encrypt_key_pair.py:18:9
 ERROR Object of class `ModuleType` has no attribute `upgrade` [missing-attribute]
@@ -2051,22 +1824,46 @@
    --> tests/unit_tests/controllers/console/app/test_app_response_models.py:112:12
 ERROR Object of class `object` has no attribute `exec_module` [missing-attribute]
    --> tests/unit_tests/controllers/console/app/test_app_response_models.py:113:5
+ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `controllers.console.app.workflow._parse_file` [bad-argument-type]
+  --> tests/unit_tests/controllers/console/app/test_workflow.py:26:40
+ERROR Argument `SimpleNamespace` is not assignable to parameter `workflow` with type `Workflow` in function `controllers.console.app.workflow._parse_file` [bad-argument-type]
+  --> tests/unit_tests/controllers/console/app/test_workflow.py:44:42
+ERROR Object of class `FunctionType` has no attribute `assert_called_once_with` [missing-attribute]
+   --> tests/unit_tests/controllers/console/app/test_workflow.py:406:5
+ERROR Object of class `FunctionType` has no attribute `call_count` [missing-attribute]
+   --> tests/unit_tests/controllers/console/app/test_workflow.py:438:12
+ERROR `in` is not supported between `Literal['Maximum']` and `None` [not-iterable]
+   --> tests/unit_tests/controllers/console/app/test_workflow.py:466:12
 ERROR Missing argument `app_model` in function `handler` [missing-argument]
-   --> tests/unit_tests/controllers/console/app/test_wraps.py:104:19
+  --> tests/unit_tests/controllers/console/app/test_wraps.py:21:19
 ERROR Unexpected keyword argument `app_id` in function `handler` [unexpected-keyword]
-   --> tests/unit_tests/controllers/console/app/test_wraps.py:104:20
+  --> tests/unit_tests/controllers/console/app/test_wraps.py:21:20
 ERROR Missing argument `app_model` in function `handler` [missing-argument]
-   --> tests/unit_tests/controllers/console/app/test_wraps.py:117:16
+  --> tests/unit_tests/controllers/console/app/test_wraps.py:34:16
 ERROR Unexpected keyword argument `app_id` in function `handler` [unexpected-keyword]
-   --> tests/unit_tests/controllers/console/app/test_wraps.py:117:17
+  --> tests/unit_tests/controllers/console/app/test_wraps.py:34:17
 ERROR Missing argument `app_model` in function `handler` [missing-argument]
-   --> tests/unit_tests/controllers/console/app/test_wraps.py:126:16
-ERROR Missing argument `app_model` in function `Handler.get` [missing-argument]
-   --> tests/unit_tests/controllers/console/app/test_wraps.py:148:25
-ERROR Unexpected keyword argument `app_id` in function `Handler.get` [unexpected-keyword]
-   --> tests/unit_tests/controllers/console/app/test_wraps.py:148:26
+  --> tests/unit_tests/controllers/console/app/test_wraps.py:43:16
 ERROR Cannot set item in `OrderedDict[str, bool | list[str] | str]` [unsupported-operation]
    --> tests/unit_tests/controllers/console/app/workflow_draft_variables_test.py:137:47
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/controllers/console/auth/test_login_logout.py:516:16
+ERROR `None` is not subscriptable [unsupported-operation]
+   --> tests/unit_tests/controllers/console/auth/test_login_logout.py:543:16
+ERROR Object of class `tuple` has no attribute `json` [missing-attribute]
+  --> tests/unit_tests/controllers/console/auth/test_token_refresh.py:74:16
+ERROR Type `Response` is not iterable [not-iterable]
+  --> tests/unit_tests/controllers/console/auth/test_token_refresh.py:92:13
+ERROR Type `Response` is not iterable [not-iterable]
+   --> tests/unit_tests/controllers/console/auth/test_token_refresh.py:117:13
+ERROR Type `Response` is not iterable [not-iterable]
+   --> tests/unit_tests/controllers/console/auth/test_token_refresh.py:142:13
+ERROR Type `Response` is not iterable [not-iterable]
+   --> tests/unit_tests/controllers/console/auth/test_token_refresh.py:165:13
+ERROR Object of class `tuple` has no attribute `json` [missing-attribute]
+   --> tests/unit_tests/controllers/console/auth/test_token_refresh.py:192:16
+ERROR Object of class `BadRequest` has no attribute `data` [missing-attribute]
+    --> tests/unit_tests/controllers/console/datasets/test_datasets.py:1655:16
 ERROR Object of class `BytesIO` has no attribute `filename` [missing-attribute]
    --> tests/unit_tests/controllers/console/explore/test_trial.py:651:9
 ERROR Object of class `BytesIO` has no attribute `filename` [missing-attribute]
@@ -2101,6 +1898,10 @@
    --> tests/unit_tests/controllers/console/explore/test_wraps.py:181:18
 ERROR Argument `Literal['app-id']` is not assignable to parameter `view` with type `(App) -> Unknown` in function `controllers.console.explore.wraps.decorator` [bad-argument-type]
    --> tests/unit_tests/controllers/console/explore/test_wraps.py:204:23
+ERROR No attribute `MethodView` in module `builtins` [missing-attribute]
+  --> tests/unit_tests/controllers/console/test_extension.py:14:5
+ERROR No attribute `MethodView` in module `builtins` [missing-attribute]
+  --> tests/unit_tests/controllers/console/test_extension.py:25:9
 ERROR Argument `Flask` is not assignable to parameter `app` with type `DifyApp` in function `extensions.ext_fastopenapi.init_app` [bad-argument-type]
   --> tests/unit_tests/controllers/console/test_fastopenapi_ping.py:21:30
 ERROR Argument `Flask` is not assignable to parameter `app` with type `DifyApp` in function `extensions.ext_fastopenapi.init_app` [bad-argument-type]
@@ -2114,13 +1915,25 @@
 ERROR Argument `SimpleNamespace` is not assignable to parameter `form` with type `Form` in function `controllers.console.human_input_form.ConsoleHumanInputFormApi._ensure_console_access` [bad-argument-type]
   --> tests/unit_tests/controllers/console/test_human_input_form.py:47:57
 ERROR Object of class `Flask` has no attribute `login_manager` [missing-attribute]
-  --> tests/unit_tests/controllers/console/test_workspace_account.py:29:5
+  --> tests/unit_tests/controllers/console/test_workspace_account.py:23:5
 ERROR `SimpleNamespace | object` is not assignable to attribute `_current_tenant` with type `Tenant | None` [bad-assignment]
-  --> tests/unit_tests/controllers/console/test_workspace_account.py:39:31
+  --> tests/unit_tests/controllers/console/test_workspace_account.py:33:31
 ERROR Object of class `Flask` has no attribute `login_manager` [missing-attribute]
-  --> tests/unit_tests/controllers/console/test_workspace_members.py:16:5
+  --> tests/unit_tests/controllers/console/test_workspace_members.py:15:5
 ERROR `SimpleNamespace` is not assignable to attribute `_current_tenant` with type `Tenant | None` [bad-assignment]
-  --> tests/unit_tests/controllers/console/test_workspace_members.py:73:43
+  --> tests/unit_tests/controllers/console/test_workspace_members.py:62:43
+ERROR Object of class `Exception` has no attribute `code` [missing-attribute]
+   --> tests/unit_tests/controllers/console/test_wraps.py:117:24
+ERROR Object of class `Exception` has no attribute `code` [missing-attribute]
+   --> tests/unit_tests/controllers/console/test_wraps.py:197:28
+ERROR Object of class `Exception` has no attribute `description` [missing-attribute]
+   --> tests/unit_tests/controllers/console/test_wraps.py:198:67
+ERROR Object of class `Exception` has no attribute `code` [missing-attribute]
+   --> tests/unit_tests/controllers/console/test_wraps.py:222:28
+ERROR Object of class `Exception` has no attribute `code` [missing-attribute]
+   --> tests/unit_tests/controllers/console/test_wraps.py:298:28
+ERROR Object of class `Exception` has no attribute `description` [missing-attribute]
+   --> tests/unit_tests/controllers/console/test_wraps.py:299:48
 ERROR `SimpleNamespace` is not assignable to attribute `db` with type `SQLAlchemy` [bad-assignment]
   --> tests/unit_tests/controllers/files/test_image_preview.py:23:17
 ERROR `SimpleNamespace` is not assignable to attribute `request` with type `Request` [bad-assignment]
@@ -2189,134 +2002,6 @@
    --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:342:35
 ERROR Missing argument `payload` in function `protected_view` [missing-argument]
    --> tests/unit_tests/controllers/inner_api/plugin/test_plugin_wraps.py:348:36
-ERROR Object of class `Step` has no attribute `_mounters` [missing-attribute]
-  --> tests/unit_tests/controllers/openapi/auth/test_composition.py:52:31
-ERROR Argument `Literal['apps:run']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
- --> tests/unit_tests/controllers/openapi/auth/test_context.py:5:34
-ERROR Argument `Literal['apps:run']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_context.py:19:34
-ERROR `frozenset[str]` is not assignable to attribute `scopes` with type `frozenset[Scope]` [bad-assignment]
-  --> tests/unit_tests/controllers/openapi/auth/test_context.py:20:18
-ERROR Argument `Literal['x']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_pipeline.py:18:65
-ERROR Argument `Literal['x']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_pipeline.py:34:61
-ERROR Argument `Literal['apps:run']` is not assignable to parameter `scope` with type `Scope` in function `controllers.openapi.auth.pipeline.Pipeline.guard` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_pipeline.py:49:27
-ERROR Argument `Literal['apps:run']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_app_resolver.py:13:35
-ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_app_resolver.py:63:12
-ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_app_resolver.py:64:12
-ERROR Argument `Literal['apps:run']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_authz.py:14:32
-ERROR `str | Unknown` is not assignable to attribute `account_id` with type `UUID | None` [bad-assignment]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_authz.py:17:20
-ERROR `SimpleNamespace` is not assignable to attribute `app` with type `App | None` [bad-assignment]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_authz.py:18:13
-ERROR `SimpleNamespace` is not assignable to attribute `tenant` with type `Tenant | None` [bad-assignment]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_authz.py:19:16
-ERROR Argument `() -> SimpleNamespace` is not assignable to parameter `resolve_strategy` with type `() -> AppAuthzStrategy` in function `controllers.openapi.auth.steps.AppAuthzCheck.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_authz.py:70:23
-ERROR Argument `() -> SimpleNamespace` is not assignable to parameter `resolve_strategy` with type `() -> AppAuthzStrategy` in function `controllers.openapi.auth.steps.AppAuthzCheck.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_authz.py:76:19
-ERROR Argument `Literal['apps:run']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_bearer.py:22:35
-ERROR Argument `Literal['apps:read']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_layer0.py:18:32
-ERROR `SimpleNamespace | None` is not assignable to attribute `tenant` with type `Tenant | None` [bad-assignment]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_layer0.py:21:16
-ERROR Argument `Literal['apps:run']` is not assignable to parameter `required_scope` with type `Scope` in function `controllers.openapi.auth.context.Context.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_mount.py:15:32
-ERROR `SimpleNamespace` is not assignable to attribute `app` with type `App | None` [bad-assignment]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_mount.py:19:13
-ERROR `SimpleNamespace` is not assignable to attribute `tenant` with type `Tenant | None` [bad-assignment]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_mount.py:20:16
-ERROR Argument `test_caller_mount_dispatches_by_subject_type.Fake` is not assignable to parameter `*mounters` with type `CallerMounter` in function `controllers.openapi.auth.steps.CallerMount.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_mount.py:68:9
-ERROR Argument `test_caller_mount_dispatches_by_subject_type.Fake` is not assignable to parameter `*mounters` with type `CallerMounter` in function `controllers.openapi.auth.steps.CallerMount.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/auth/test_step_mount.py:69:9
-ERROR `in` is not supported between `Literal['wrong_surface']` and `None` [not-iterable]
-  --> tests/unit_tests/controllers/openapi/auth/test_surface_gate.py:93:20
-ERROR `in` is not supported between `Literal['/openapi/v1/apps']` and `None` [not-iterable]
-  --> tests/unit_tests/controllers/openapi/auth/test_surface_gate.py:96:20
-ERROR Object of class `FunctionType` has no attribute `view_class` [missing-attribute]
-  --> tests/unit_tests/controllers/openapi/test_account.py:40:12
-ERROR Object of class `FunctionType` has no attribute `view_class` [missing-attribute]
-  --> tests/unit_tests/controllers/openapi/test_account.py:50:12
-ERROR `in` is not supported between `Literal['GET']` and `None` [not-iterable]
-  --> tests/unit_tests/controllers/openapi/test_account.py:55:12
-ERROR `in` is not supported between `Literal['DELETE']` and `None` [not-iterable]
-  --> tests/unit_tests/controllers/openapi/test_account.py:60:12
-ERROR Object of class `FunctionType` has no attribute `view_class` [missing-attribute]
-  --> tests/unit_tests/controllers/openapi/test_account.py:70:12
-ERROR `in` is not supported between `Literal['GET']` and `None` [not-iterable]
-  --> tests/unit_tests/controllers/openapi/test_account.py:71:12
-ERROR Object of class `FunctionType` has no attribute `view_class` [missing-attribute]
-  --> tests/unit_tests/controllers/openapi/test_account.py:81:12
-ERROR `in` is not supported between `Literal['DELETE']` and `None` [not-iterable]
-  --> tests/unit_tests/controllers/openapi/test_account.py:82:12
-ERROR Argument `frozenset[str]` is not assignable to parameter `scopes` with type `frozenset[Scope]` in function `libs.oauth_bearer.AuthContext.__init__` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/test_account.py:99:16
-ERROR Argument `frozenset[str]` is not assignable to parameter `scopes` with type `frozenset[Scope]` in function `libs.oauth_bearer.AuthContext.__init__` [bad-argument-type]
-   --> tests/unit_tests/controllers/openapi/test_account.py:128:16
-ERROR Argument `SimpleNamespace` is not assignable to parameter `app` with type `App` in function `controllers.openapi.apps.parameters_payload` [bad-argument-type]
-  --> tests/unit_tests/controllers/openapi/test_app_payloads.py:37:28
-ERROR Argument `SimpleNamespace` is not assignable to parameter `app` with type\n\n... (truncated) ...

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 45.73% 43.69% -2.04%
Strict coverage 45.26% 43.22% -2.04%
Typed symbols 24,434 22,132 -2,302
Untyped symbols 29,300 28,835 -465
Modules 2736 2557 -179

@fatelei fatelei added this pull request to the merge queue May 27, 2026
Merged via the queue into langgenius:main with commit bee21c9 May 27, 2026
28 checks passed
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:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Milvus vectorstore does not support explicit TLS configuration

2 participants