dify/api/services
QuantumGhost 81d9a9d00d feat(api): limit conversation variable description length
Previously, conversation variable descriptions had no length limit, causing errors
when debugging chatflows. These descriptions are saved as draft variable descriptions
during debugging, which have a 256-character limit. Variables with descriptions
exceeding this limit could not be saved, resulting in 500 errors and "Internal
Server Error" messages during chatflow debugging.

This commit implements description length limits for conversation variables:

- New chatflows: Hard limit of 256 characters for descriptions. Longer
  descriptions are rejected and prevent chatflow saving.
- Existing chatflows: If all conversation variable descriptions are under
  256 characters, the same limit applies as new chatflows. Otherwise, no limit
  is enforced to maintain backward compatibility.
2025-09-11 17:42:30 +08:00
..
auth update sql in batch (#24801) 2025-09-10 13:00:17 +08:00
enterprise add typing to all wraps (#25405) 2025-09-09 16:48:33 +08:00
entities remove bare list, dict, Sequence, None, Any (#25058) 2025-09-06 03:32:23 +08:00
errors feat(api): limit conversation variable description length 2025-09-11 17:42:30 +08:00
plugin Fix basedpyright type errors (#25435) 2025-09-10 01:54:26 +08:00
recommend_app update sql in batch (#24801) 2025-09-10 13:00:17 +08:00
tools update sql in batch (#24801) 2025-09-10 13:00:17 +08:00
workflow Fix basedpyright type errors (#25435) 2025-09-10 01:54:26 +08:00
__init__.py chore(api/services): apply ruff reformatting (#7599) 2024-08-26 13:43:57 +08:00
account_service.py Fix: Add Password Validation to Account Creation (#25382) 2025-09-10 08:58:39 +08:00
advanced_prompt_template_service.py remove bare list, dict, Sequence, None, Any (#25058) 2025-09-06 03:32:23 +08:00
agent_service.py more assert (#24996) 2025-09-08 09:59:43 +08:00
annotation_service.py update sql in batch (#24801) 2025-09-10 13:00:17 +08:00
api_based_extension_service.py remove bare list, dict, Sequence, None, Any (#25058) 2025-09-06 03:32:23 +08:00
app_dsl_service.py Chore: thanks to bump-pydantic (#25437) 2025-09-09 20:07:17 +08:00
app_generate_service.py [Chore/Refactor] Switch from MyPy to Basedpyright for type checking (#25047) 2025-09-03 11:52:26 +08:00
app_model_config_service.py remove bare list, dict, Sequence, None, Any (#25058) 2025-09-06 03:32:23 +08:00
app_service.py more assert (#24996) 2025-09-08 09:59:43 +08:00
audio_service.py [Chore/Refactor] Improve type annotations in models module (#25281) 2025-09-08 09:42:27 +08:00
billing_service.py more assert (#24996) 2025-09-08 09:59:43 +08:00
clear_free_plan_tenant_expired_logs.py update sql in batch (#24801) 2025-09-10 13:00:17 +08:00
code_based_extension_service.py remove bare list, dict, Sequence, None, Any (#25058) 2025-09-06 03:32:23 +08:00
conversation_service.py remove bare list, dict, Sequence, None, Any (#25058) 2025-09-06 03:32:23 +08:00
dataset_service.py Fix 500 in dataset page. (#25474) 2025-09-10 15:57:04 +08:00
external_knowledge_service.py Fix basedpyright type errors (#25435) 2025-09-10 01:54:26 +08:00
feature_service.py Feat/credential policy (#25151) 2025-09-08 23:45:05 -07:00
file_service.py Fix basedpyright type errors (#25435) 2025-09-10 01:54:26 +08:00
hit_testing_service.py remove bare list, dict, Sequence, None, Any (#25058) 2025-09-06 03:32:23 +08:00
knowledge_service.py feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
message_service.py fix wrong filter handle for saved messages (#24891) 2025-09-01 16:32:08 +08:00
metadata_service.py Refactor: use logger = logging.getLogger(__name__) in logging (#24515) 2025-08-26 18:10:31 +08:00
model_load_balancing_service.py update sql in batch (#24801) 2025-09-10 13:00:17 +08:00
model_provider_service.py remove bare list, dict, Sequence, None, Any (#25058) 2025-09-06 03:32:23 +08:00
oauth_server.py feat: oauth provider (#24206) 2025-08-29 14:10:51 +08:00
operation_service.py chore(api/services): apply ruff reformatting (#7599) 2024-08-26 13:43:57 +08:00
ops_service.py Fix login tokens and fix task clean_messages create_time. (#24574) 2025-08-27 13:32:18 +08:00
recommended_app_service.py remove bare list, dict, Sequence, None, Any (#25058) 2025-09-06 03:32:23 +08:00
saved_message_service.py orm filter -> where (#22801) 2025-07-24 00:57:45 +08:00
tag_service.py update sql in batch (#24801) 2025-09-10 13:00:17 +08:00
vector_service.py Refactor: use logger = logging.getLogger(__name__) in logging (#24515) 2025-08-26 18:10:31 +08:00
web_conversation_service.py orm filter -> where (#22801) 2025-07-24 00:57:45 +08:00
webapp_auth_service.py example for rm extra cast (#24646) 2025-08-28 09:37:39 +08:00
website_service.py remove bare list, dict, Sequence, None, Any (#25058) 2025-09-06 03:32:23 +08:00
workflow_app_service.py remove bare list, dict, Sequence, None, Any (#25058) 2025-09-06 03:32:23 +08:00
workflow_draft_variable_service.py remove bare list, dict, Sequence, None, Any (#25058) 2025-09-06 03:32:23 +08:00
workflow_run_service.py feat(api/repo): Allow to config repository implementation (#21458) 2025-07-14 14:54:38 +08:00
workflow_service.py feat(api): limit conversation variable description length 2025-09-11 17:42:30 +08:00
workspace_service.py Fix basedpyright type errors (#25435) 2025-09-10 01:54:26 +08:00