dify/api/configs
Yansong Zhang 66212e3575 feat(api): implement zero-migration transparent upgrade (Phase 8)
Add two feature-flag-controlled upgrade paths that allow existing apps
and LLM nodes to transparently run through the Agent V2 engine without
any database migration:

1. AGENT_V2_TRANSPARENT_UPGRADE (default: off):
   When enabled, old apps (chat/completion/agent-chat) bypass legacy
   Easy-UI runners. VirtualWorkflowSynthesizer converts AppModelConfig
   to an in-memory Workflow (start -> agent-v2 -> answer) at runtime,
   then executes via AdvancedChatAppGenerator. Falls back to legacy
   path on any synthesis error.

   VirtualWorkflowSynthesizer maps:
   - model JSON -> ModelConfig
   - pre_prompt/chat_prompt_config -> prompt_template
   - agent_mode.tools -> ToolMetadata[]
   - agent_mode.strategy -> agent_strategy
   - dataset_configs -> context
   - file_upload -> vision

2. AGENT_V2_REPLACES_LLM (default: off):
   When enabled, DifyNodeFactory.create_node() transparently remaps
   nodes with type="llm" to type="agent-v2" before class resolution.
   Since AgentV2NodeData is a strict superset of LLMNodeData, the
   mapping is lossless. With tools=[], Agent V2 behaves identically
   to LLM Node.

Both flags default to False for safety. Turn off = instant rollback.
46 existing tests pass. Flask starts successfully.

Made-with: Cursor
2026-04-09 10:30:52 +08:00
..
deploy feat: add debug log for request and response (#19781) (#19783) 2025-05-17 17:31:09 +08:00
enterprise feat: enterprise otel exporter (#33138) 2026-03-27 07:56:31 +00:00
extra feat: add archive storage client and env config (#30422) 2025-12-31 16:14:46 +08:00
feature feat(api): implement zero-migration transparent upgrade (Phase 8) 2026-04-09 10:30:52 +08:00
middleware fix: do not block upsert for baidu vdb (#33280) 2026-03-23 20:42:57 +08:00
observability feat: add otel endpoint config (#22492) 2025-07-16 18:24:17 +08:00
packaging fix: resolve typing errors in configs module (#25268) 2025-09-06 16:08:14 +08:00
remote_settings_sources more httpx (#25651) 2025-09-22 23:07:09 +08:00
__init__.py feat: knowledge pipeline (#25360) 2025-09-18 12:49:10 +08:00
app_config.py feat: enterprise otel exporter (#33138) 2026-03-27 07:56:31 +00:00