Yansong Zhang
e9ee897973
fix: resolve remaining CI failures for style checks and unit tests
...
- Add model_features property and build_execution_context method to
AgentAppRunner to fix mypy attr-defined errors
- Export WorkflowComment, WorkflowCommentReply, WorkflowCommentMention
from models/__init__.py to fix import errors
- Add NestedNodeGraphRequest, NestedNodeGraphResponse,
NestedNodeParameterSchema to services/workflow/entities.py
- Update test_agent_chat_app_runner: tests for invalid LLM mode and
invalid strategy now reflect unified AgentAppRunner behavior
(no longer raises ValueError for these cases)
Made-with: Cursor
2026-04-13 16:07:38 +08:00
Yansong Zhang
971828615e
fix: resolve CI failures for Python style, DB migration, and unit tests
...
- Fix type errors in dify_graph/nodes/agent/agent_node.py:
- Add missing user_id param to get_agent_tool_runtime call
- Use create_plugin_provider_manager instead of bare ProviderManager()
- Pass provider_manager to ModelManager constructor
- Add access_controller param to file_factory.build_from_mapping
- Fix return type annotation for _fetch_memory
- Fix DB migration chain: update workflow_comments migration to point
to correct parent after sandbox migration removal
- Fix test_app_generate_service: set AGENT_V2_TRANSPARENT_UPGRADE=False
in mock config to prevent transparent upgrade intercepting test flow
- Fix test_app_generator: add scalar method to mock db.session
- Fix test_app_models: add AppMode.AGENT to expected modes set
- Remove unnecessary db.session.close() from agent_chat app_runner
Made-with: Cursor
2026-04-13 15:07:16 +08:00
zyssyz123
3e0578a1c6
Merge branch 'main' into feat/new-agent-node
2026-04-13 13:43:47 +08:00
sxxtony
7dd507af04
refactor: migrate SegmentAttachmentBinding to TypeBase ( #34810 )
2026-04-13 05:22:43 +00:00
Yansong Zhang
5f87239abc
fix: resolve CI failures — unused imports, type errors, test updates
...
- Remove 12 unused imports across node.py, tool_manager.py,
event_adapter.py, legacy_response_adapter.py
- Fix Sequence[str] → list[str] type annotation in node.py
- Update test_agent_chat_app_runner.py: CotChatAgentRunner →
AgentAppRunner (old runner classes replaced by unified runner)
Made-with: Cursor
2026-04-13 13:10:08 +08:00
Yansong Zhang
c03b25a940
merge: resolve conflicts with origin/main
...
Conflicts resolved:
- workflow_app_runner.py: adopt main's DifyGraphInitContext pattern
- token_buffer_memory.py: adopt main's match/case, add AppMode.AGENT
- app_dsl_service.py: adopt main's match/case, add AppMode.AGENT
Made-with: Cursor
2026-04-13 12:52:56 +08:00
XHamzaX
596559efc9
fix(rag): include is_summary and original_chunk_id in default vector projection ( #34950 )
...
Co-authored-by: VFootball Dev <vfootball@example.com>
2026-04-13 03:11:08 +00:00
wdeveloper16
0841b4c663
refactor(api): migrate tools, account, workflow and plugin services to SQLAlchemy 2.0 ( #34966 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-12 01:45:27 +00:00
wdeveloper16
12814b55d2
refactor(api): migrate core RAG layer to SQLAlchemy 2.0 select() API ( #34965 )
2026-04-11 16:32:20 +00:00
wangxiaolei
65d66768c1
fix: fix tool output duplicate ( #34962 )
2026-04-11 15:07:31 +00:00
carlos4s
86fd94767c
refactor(api): use sessionmaker in relyt & tidb_vector VDB services ( #34848 )
2026-04-10 03:16:25 +00:00
corevibe555
d826ac7099
refactor(models): replace Any with precise types in Tenant and MCPToo… ( #34880 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-10 03:12:38 +00:00
Jean Ibarz
d50f096b14
fix(mcp): catch JSONDecodeError in OAuth discovery functions 🤖 🤖 🤖 ( #34868 )
2026-04-10 01:28:57 +00:00
-LAN-
d1e33ba9ea
refactor(api): reduce Dify GraphInitParams usage ( #34825 )
2026-04-09 07:59:15 +00:00
carlos4s
d360929af1
refactor(api): use sessionmaker in pgvecto_rs VDB service ( #34818 )
2026-04-09 05:49:03 +00:00
aliworksx08
b5acc8e392
refactor: migrate session.query to select API in core tools ( #34814 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-09 05:44:49 +00:00
carlos4s
02a9f0abca
refactor(api): use sessionmaker in core app generators & pipelines ( #34771 )
2026-04-08 23:15:58 +00:00
tmimmanuel
1a4eb47e1d
refactor(api): tighten types in trivial lint and config fixes ( #34773 )
...
Co-authored-by: tmimmanuel <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>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-08 23:14:44 +00:00
carlos4s
4c70bfa8b8
refactor(api): use sessionmaker in trigger provider service & dataset… ( #34774 )
2026-04-08 23:13:38 +00:00
Yansong Zhang
8f3a3ea03e
feat(api): enable Agent mode in workflow/service APIs and add default config (Phase 7)
...
Ensure new Agent apps (AppMode.AGENT) can access all workflow-related
APIs and Service API chat endpoints:
- Add AppMode.AGENT to 13 workflow controller mode checks
- Add AppMode.AGENT to 4 workflow_run controller mode checks
- Add AppMode.AGENT to workflow_draft_variable controller
- Add AppMode.AGENT to Service API chat, conversation, message endpoints
- Add AgentV2Node.get_default_config() with prompt templates and strategy defaults
- 46 unit tests all passing (8 new Phase 7 tests)
Old agent/agent-chat paths remain completely unchanged.
Made-with: Cursor
2026-04-08 12:41:37 +08:00
Yansong Zhang
96641a93f6
feat(api): add Agent V2 node and new Agent app type (Phase 1-3)
...
Introduce a new unified Agent V2 workflow node that combines LLM capabilities
with agent tool-calling loops, along with a new AppMode.AGENT for standalone
agent apps backed by single-node workflows.
Phase 1 — Agent Patterns:
- Add core/agent/patterns/ module (AgentPattern, FunctionCallStrategy,
ReActStrategy, StrategyFactory) ported from feat/support-agent-sandbox
- Add ExecutionContext, AgentLog, AgentResult entities
- Add Tool.to_prompt_message_tool() for LLM-consumable tool conversion
Phase 2 — Agent V2 Workflow Node:
- Add core/workflow/nodes/agent_v2/ (AgentV2Node, AgentV2NodeData,
AgentV2ToolManager, AgentV2EventAdapter)
- Register agent-v2 node type in DifyNodeFactory
- No-tools path: single LLM call (LLM Node equivalent)
- Tools path: FC/ReAct loop via StrategyFactory
Phase 3 — Agent App Type:
- Add AppMode.AGENT to model enum
- Add WorkflowGraphFactory for auto-generating start->agent_v2->answer graphs
- AppService.create_app() creates workflow draft for AGENT mode
- AppGenerateService.generate() routes AGENT to AdvancedChatAppGenerator
- Console API and DSL import/export support AGENT mode
- Default app template for AGENT mode
Old agent/agent-chat/LLM node paths are fully preserved.
38 unit tests all passing.
Made-with: Cursor
2026-04-08 12:31:23 +08:00
corevibe555
c825d5dcf6
refactor(api): tighten types for Tenant.custom_config_dict and MCPToolProvider.headers ( #34698 )
2026-04-08 01:36:42 +00:00
corevibe555
624db69f12
refactor(api): remove duplicated RAG entities from services layer ( #34689 )
2026-04-07 23:36:59 +00:00
corevibe555
80a7843f45
refactor(api): migrate consumers to shared RAG domain entities from core/rag/entities/ ( #34692 )
2026-04-07 23:22:56 +00:00
Renzo
72adb5468c
refactor: migrate session.query to select API in retrieval_service ( #34638 )
2026-04-07 04:46:30 +00:00
Renzo
b55bef4438
refactor: migrate session.query to select API in core misc modules ( #34608 )
2026-04-07 04:08:34 +00:00
Akash Kumar
9a8c853a2e
test: added unit test for remaining files in core helper folder ( #33288 )
...
Co-authored-by: rajatagarwal-oss <rajat.agarwal@infocusp.com>
Co-authored-by: sahil-infocusp <73810410+sahil-infocusp@users.noreply.github.com>
2026-04-02 06:50:58 +00:00
wangxiaolei
993a301468
fix: fix online_drive is not a valid datasource_type ( #34440 )
2026-04-02 04:45:02 +00:00
jimmyzhuu
b23ea0397a
fix: apply Baidu Vector DB connection timeout when initializing Mochow client ( #34328 )
2026-04-01 06:16:09 +00:00
Dream
c51cd42cb4
refactor(api): replace json.loads with Pydantic validation in controllers and infra layers ( #34277 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-01 05:41:44 +00:00
Full Stack Engineer
09ee8ea1f5
fix: support qa_preview shape in IndexProcessor preview formatting ( #34151 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Crazywoola <100913391+crazywoola@users.noreply.github.com>
2026-04-01 04:22:23 +00:00
Renzo
4bd388669a
refactor: core/app pipeline, core/datasource, and core/indexing_runner ( #34359 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-01 02:20:56 +00:00
wangxiaolei
57f358a96b
perf: use global httpx client instead of per request create new one ( #34311 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-01 01:19:32 +00:00
99
f27d669f87
chore: normalize frozenset literals and myscale typing ( #34327 )
2026-03-31 08:21:22 +00:00
tmimmanuel
1344c3b280
refactor: use EnumText for model_type in provider models ( #34300 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-31 00:31:33 +00:00
lif
bc14ad6a8f
fix: map checkbox and json_object types in MCP schema publishing ( #34226 )
...
Signed-off-by: majiayu000 <1835304752@qq.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
2026-03-30 15:05:57 +00:00
lif
ae9a16a397
fix: upgrade langfuse SDK to v3+ for LLM-as-judge support ( #34265 )
...
Signed-off-by: majiayu000 <1835304752@qq.com>
2026-03-30 13:06:55 +00:00
Renzo
456684dfc3
refactor: core/rag docstore, datasource, embedding, rerank, retrieval ( #34203 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
2026-03-30 08:09:49 +00:00
Renzo
364d7ebc40
refactor: core/tools, agent, callback_handler, encrypter, llm_generator, plugin, inner_api ( #34205 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
2026-03-28 10:14:43 +00:00
99
40591a7c50
refactor(api): use standalone graphon package ( #34209 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-27 21:05:32 +00:00
Renzo
32d394d65b
refactor: select in core/ops trace manager and trace providers ( #34197 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-27 14:00:26 +00:00
Xiyuan Chen
5a8a68cab8
feat: enterprise otel exporter ( #33138 )
...
Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com>
Co-authored-by: Yunlu Wen <yunlu.wen@dify.ai>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-27 07:56:31 +00:00
wangxiaolei
689761bfcb
feat: return correct dify-plugin-daemon error message ( #34171 )
2026-03-27 06:02:29 +00:00
99
fcfc96ca05
chore: remove stale mypy suppressions and align dataset service tests ( #34130 )
2026-03-26 12:34:44 +00:00
-LAN-
496baa9335
chore(api): remove backend utcnow usage ( #34131 )
2026-03-26 08:51:49 +00:00
Achieve3318
5341cd015b
fix: dataset query created_by empty UUID in iteration subgraph ( #34004 ) ( #34044 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-26 14:57:19 +08:00
99
52e7492cbc
refactor(api): rename dify_graph to graphon ( #34095 )
2026-03-25 21:58:56 +08:00
-LAN-
56593f20b0
refactor(api): continue decoupling dify_graph from API concerns ( #33580 )
...
Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: WH-2099 <wh2099@pm.me>
2026-03-25 20:32:24 +08:00
tmimmanuel
a946015ebf
test: replace indexing_technique string literals with IndexTechnique ( #34042 )
2026-03-25 12:39:58 +09:00
Rajat Agarwal
6f137fdb00
test: unit test cases for rag.cleaner, rag.data_post_processor and rag.datasource ( #32521 )
2026-03-25 02:19:15 +08:00