langgenius / langgenius/dify

agent app validation error

Open
#38,327 2 comments 1 reaction 0 assignees View on GitHub
🐞 bug 1.15.0 project#dify
Dominant language
TypeScript
Stars
156k
Forks
24.6k
Avg merge
22h 9m
Merged PRs (30d)
610

Description

### Self Checks

- [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542).
- [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general).
- [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones.
- [x] I confirm that I am using English to submit this report, otherwise it will be closed.
- [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- [x] Please do not modify this template :) and fill in all the required fields.

### Dify version

1.15.0

### Cloud or Self Hosted

Self Hosted (Docker)

### Steps to reproduce

1. create agent app
2. send request
```
{"response_mode":"streaming","conversation_id":"","files":[],"query":"dify","inputs":{},"model_config":{"pre_prompt":"","prompt_type":"simple","chat_prompt_config":{"prompt":[{"role":"system","text":""}]},"completion_prompt_config":{"prompt":{"text":""},"conversation_histories_role":{"user_prefix":"","assistant_prefix":""}},"user_input_form":[],"dataset_query_variable":"","opening_statement":"","more_like_this":{"enabled":false},"suggested_questions":[],"suggested_questions_after_answer":{"enabled":false},"text_to_speech":{"enabled":false},"speech_to_text":{"enabled":false},"retriever_resource":{"enabled":true},"sensitive_word_avoidance":{"enabled":false,"type":"","config":{}},"agent_mode":{"max_iteration":10,"enabled":true,"strategy":"react","tools":[],"prompt":null},"dataset_configs":{"retrieval_model":"multiple","top_k":4,"reranking_mode":"reranking_model","reranking_model":{"reranking_provider_name":"","reranking_model_name":""},"datasets":{"datasets":[{"dataset":{"enabled":true,"id":"72cbc1e3-ec6b-4310-959f-259b7a7b8d24"}}]}},"file_upload":{"image":{"detail":"high","enabled":false,"number_limits":3,"transfer_methods":["remote_url","local_file"]},"enabled":false,"allowed_file_types":[],"allowed_file_extensions":[".JPG",".JPEG",".PNG",".GIF",".WEBP",".SVG",".MP4",".MOV",".MPEG",".WEBM"],"allowed_file_upload_methods":["remote_url","local_file"],"number_limits":3,"fileUploadConfig":{"file_size_limit":15,"batch_count_limit":5,"file_upload_limit":10,"image_file_size_limit":10,"video_file_size_limit":100,"audio_file_size_limit":50,"workflow_file_upload_limit":10,"image_file_batch_limit":10,"single_chunk_attachment_limit":10,"attachment_image_file_size_limit":2}},"annotation_reply":{"enabled":false},"supportAnnotation":true,"appId":"3a788434-da49-4fdd-89b3-b65009d8c4c4","supportCitationHitInfo":true,"model":{"provider":"langgenius/anthropic/anthropic","name":"claude-opus-4-8","mode":"chat","completion_params":{}}},"parent_message_id":null}
```
3. response validation error

### ✔️ Expected Behavior

no error

### ❌ Actual Behavior

```
{
"code": "invalid_param",
"message": "2 validation errors for tagged-union[SensitiveWordAvoidanceDisabledConfig,tagged-union[SensitiveWordAvoidanceKeywordsConfig,SensitiveWordAvoidanceOpenAIConfig,SensitiveWordAvoidanceAPIConfig]]\n0.type\n Extra inputs are not permitted [type=extra_forbidden, input_value='', input_type=str]\n For further information visit https:\/\/errors.pydantic.dev\/2.12\/v\/extra_forbidden\n0.config\n Extra inputs are not permitted [type=extra_forbidden, input_value={}, input_type=dict]\n For further information visit https:\/\/errors.pydantic.dev\/2.12\/v\/extra_forbidden",
"status": 400
}
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the agent app request in the self-hosted Docker setup and trace validation of the sensitive_word_avoidance fields. Check the request model handling the empty type and config values; done means the reported request is accepted without the Pydantic extra-input validation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.