mirror of
https://github.com/langgenius/dify.git
synced 2026-05-31 22:26:19 +08:00
Adds POST /console/api/apps/<id>/agent-features, a dedicated write surface for an Agent App's PRD "Misc Legacy" presentation features. The legacy /model-config endpoint also writes model / prompt / agent tools, which an Agent App owns through its Soul, so reusing it would be semantically wrong and let a caller override Soul-owned config. AgentAppFeatureConfigService validates only the allowed feature subset (opening_statement, suggested_questions, suggested_questions_after_answer, speech_to_text, text_to_speech, retriever_resource, sensitive_word_avoidance), fills disabled/empty defaults, and writes a new app_model_config version with model / prompt / agent_mode left NULL. Soul-owned keys (model, pre_prompt, agent_mode, tools, user_input_form) are dropped, so App.is_agent stays False and the app mode is never mutated. Live-verified: posting opener + follow-up + citations (with model/agent_mode smuggled in) persists a new config row with model=None/agent_mode=None, surfaces through /v1/parameters, keeps mode=agent, and streaming chat still works. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>