When annotations is non-empty, enabling “annotation reply” fails #18985

Closed
opened 2026-02-21 19:54:20 -05:00 by yindo · 0 comments
Owner

Originally created by @Replica0110 on GitHub (Oct 9, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.9.1

Cloud or Self Hosted

Cloud, Self Hosted (Docker)

Steps to reproduce

  1. Create one or more annotations in an application.
  2. Attempt to enable the “Annotation Reply” switch.
  3. Save the changes, it showed succeeds.
  4. Observe that the change is not applied.
  5. Delete all annotations.
  6. With no annotations existing, attempt again to enable “Annotation Reply” — it succeeds.

logs here:

nginx         | 2025-10-10 11:48:14.012 | 172.19.0.1 - - [10/Oct/2025:03:48:14 +0000] "GET /tools?_rsc=25rop HTTP/1.1" 200 162 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-"
plugin_daemon | 2025-10-10 11:48:15.435 | [GIN] 2025/10/10 - 03:48:15 | 200 |    7.528258ms |      172.19.0.3 | GET      "/plugin/76404d36-723b-44e8-bed2-e9d04c91e9d9/management/models?page=1&page_size=256"
plugin_daemon | 2025-10-10 11:48:15.449 | [GIN] 2025/10/10 - 03:48:15 | 200 |      29.747µs |      172.19.0.3 | GET      "/plugin/76404d36-723b-44e8-bed2-e9d04c91e9d9/asset/0179a4422f60cc28de38c7b3395b8504c9a7516c050d355849784a46bcea3b91.svg"
nginx         | 2025-10-10 11:48:15.450 | 172.19.0.1 - - [10/Oct/2025:03:48:15 +0000] "GET /console/api/workspaces/76404d36-723b-44e8-bed2-e9d04c91e9d9/model-providers/langgenius/siliconflow/siliconflow/icon_small/en_US HTTP/1.1" 200 595 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-"
plugin_daemon | 2025-10-10 11:48:15.470 | [GIN] 2025/10/10 - 03:48:15 | 200 |     7.13615ms |      172.19.0.3 | GET      "/plugin/76404d36-723b-44e8-bed2-e9d04c91e9d9/management/models?page=1&page_size=256"
plugin_daemon | 2025-10-10 11:48:15.483 | [GIN] 2025/10/10 - 03:48:15 | 200 |   13.608696ms |      172.19.0.3 | GET      "/plugin/76404d36-723b-44e8-bed2-e9d04c91e9d9/management/models?page=1&page_size=256"
nginx         | 2025-10-10 11:48:15.494 | 172.19.0.1 - - [10/Oct/2025:03:48:15 +0000] "GET /console/api/workspaces/current/default-model?model_type=text-embedding HTTP/1.1" 200 996 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-"
nginx         | 2025-10-10 11:48:15.517 | 172.19.0.1 - - [10/Oct/2025:03:48:15 +0000] "GET /console/api/workspaces/current/models/model-types/text-embedding HTTP/1.1" 200 3397 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-"
worker        | 2025-10-10 11:48:16.172 | 2025-10-10 11:48:16.171 INFO [MainThread] [strategy.py:161] - Task tasks.annotation.enable_annotation_reply_task.enable_annotation_reply_task[cab8e0e6-68b4-409d-968b-76797e10f132] received
worker        | 2025-10-10 11:48:16.172 | 2025-10-10 11:48:16.172 INFO [Dummy-26] [enable_annotation_reply_task.py:33] - Start add app annotation to index: f2e68177-ffcd-4073-9790-282e32c334c8
nginx         | 2025-10-10 11:48:16.186 | 172.19.0.1 - - [10/Oct/2025:03:48:16 +0000] "POST /console/api/apps/f2e68177-ffcd-4073-9790-282e32c334c8/annotation-reply/enable HTTP/1.1" 200 73 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-"
plugin_daemon | 2025-10-10 11:48:16.188 | [GIN] 2025/10/10 - 03:48:16 | 200 |    6.339006ms |      172.19.0.4 | GET      "/plugin/76404d36-723b-44e8-bed2-e9d04c91e9d9/management/models?page=1&page_size=256"
nginx         | 2025-10-10 11:48:16.199 | 172.19.0.1 - - [10/Oct/2025:03:48:16 +0000] "GET /console/api/apps/f2e68177-ffcd-4073-9790-282e32c334c8/annotation-reply/enable/status/a51d02b4-b67d-46cf-bb95-331b2ed08ad8 HTTP/1.1" 200 88 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-"
worker        | 2025-10-10 11:48:16.673 | 2025-10-10 11:48:16.672 INFO [Dummy-26] [vector_factory.py:186] - start embedding 1 texts 1760068096.6728811
worker        | 2025-10-10 11:48:16.673 | 2025-10-10 11:48:16.673 INFO [Dummy-26] [vector_factory.py:192] - Processing batch 1/1000 (1 texts)
worker        | 2025-10-10 11:48:16.675 | 2025-10-10 11:48:16.675 INFO [Dummy-26] [vector_factory.py:194] - Embedding batch 1/1000 took 0.0020935535430908203 s
worker        | 2025-10-10 11:48:16.689 | 2025-10-10 11:48:16.689 INFO [Dummy-26] [vector_factory.py:198] - Embedding 1 texts took 0.01626276969909668 s
worker        | 2025-10-10 11:48:16.690 | 2025-10-10 11:48:16.689 INFO [Dummy-26] [enable_annotation_reply_task.py:115] - App annotations added to index: f2e68177-ffcd-4073-9790-282e32c334c8 latency: 0.5173212859999694
worker        | 2025-10-10 11:48:16.704 | 2025-10-10 11:48:16.703 INFO [Dummy-26] [trace.py:128] - Task tasks.annotation.enable_annotation_reply_task.enable_annotation_reply_task[cab8e0e6-68b4-409d-968b-76797e10f132] succeeded in 0.5317181689997597s: None
nginx         | 2025-10-10 11:48:19.216 | 172.19.0.1 - - [10/Oct/2025:03:48:19 +0000] "GET /console/api/apps/f2e68177-ffcd-4073-9790-282e32c334c8/annotation-reply/enable/status/a51d02b4-b67d-46cf-bb95-331b2ed08ad8 HTTP/1.1" 200 90 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-"
nginx         | 2025-10-10 11:48:19.235 | 172.19.0.1 - - [10/Oct/2025:03:48:19 +0000] "GET /console/api/apps/f2e68177-ffcd-4073-9790-282e32c334c8/annotation-setting HTTP/1.1" 200 18 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-"
nginx         | 2025-10-10 11:48:19.260 | 172.19.0.1 - - [10/Oct/2025:03:48:19 +0000] "GET /console/api/apps/f2e68177-ffcd-4073-9790-282e32c334c8/annotation-setting HTTP/1.1" 200 18 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-"

✔️ Expected Behavior

Even when annotations already exist, the user should be able to enable the “Annotation Reply” feature. Enabling it should trigger any necessary initialization (e.g. embedding computation, indexing of existing annotations) behind the scenes so that the feature becomes active without requiring the annotation list to be empty.

Actual Behavior

When there are existing annotations, the toggle to enable “Annotation Reply” is does not take effect.

The backend shows that vector indexing has been performed for the existing annotations.

No visible errors in frontend UI or backend logs.

Only after deleting all annotations does enabling “Annotation Reply” work as expected.

Originally created by @Replica0110 on GitHub (Oct 9, 2025). ### 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.9.1 ### Cloud or Self Hosted Cloud, Self Hosted (Docker) ### Steps to reproduce 1. Create one or more annotations in an application. 2. Attempt to enable the “Annotation Reply” switch. 4. Save the changes, it showed succeeds. 6. Observe that the change is not applied. 7. Delete all annotations. 8. With no annotations existing, attempt again to enable “Annotation Reply” — it succeeds. logs here: ``` nginx | 2025-10-10 11:48:14.012 | 172.19.0.1 - - [10/Oct/2025:03:48:14 +0000] "GET /tools?_rsc=25rop HTTP/1.1" 200 162 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-" plugin_daemon | 2025-10-10 11:48:15.435 | [GIN] 2025/10/10 - 03:48:15 | 200 | 7.528258ms | 172.19.0.3 | GET "/plugin/76404d36-723b-44e8-bed2-e9d04c91e9d9/management/models?page=1&page_size=256" plugin_daemon | 2025-10-10 11:48:15.449 | [GIN] 2025/10/10 - 03:48:15 | 200 | 29.747µs | 172.19.0.3 | GET "/plugin/76404d36-723b-44e8-bed2-e9d04c91e9d9/asset/0179a4422f60cc28de38c7b3395b8504c9a7516c050d355849784a46bcea3b91.svg" nginx | 2025-10-10 11:48:15.450 | 172.19.0.1 - - [10/Oct/2025:03:48:15 +0000] "GET /console/api/workspaces/76404d36-723b-44e8-bed2-e9d04c91e9d9/model-providers/langgenius/siliconflow/siliconflow/icon_small/en_US HTTP/1.1" 200 595 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-" plugin_daemon | 2025-10-10 11:48:15.470 | [GIN] 2025/10/10 - 03:48:15 | 200 | 7.13615ms | 172.19.0.3 | GET "/plugin/76404d36-723b-44e8-bed2-e9d04c91e9d9/management/models?page=1&page_size=256" plugin_daemon | 2025-10-10 11:48:15.483 | [GIN] 2025/10/10 - 03:48:15 | 200 | 13.608696ms | 172.19.0.3 | GET "/plugin/76404d36-723b-44e8-bed2-e9d04c91e9d9/management/models?page=1&page_size=256" nginx | 2025-10-10 11:48:15.494 | 172.19.0.1 - - [10/Oct/2025:03:48:15 +0000] "GET /console/api/workspaces/current/default-model?model_type=text-embedding HTTP/1.1" 200 996 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-" nginx | 2025-10-10 11:48:15.517 | 172.19.0.1 - - [10/Oct/2025:03:48:15 +0000] "GET /console/api/workspaces/current/models/model-types/text-embedding HTTP/1.1" 200 3397 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-" worker | 2025-10-10 11:48:16.172 | 2025-10-10 11:48:16.171 INFO [MainThread] [strategy.py:161] - Task tasks.annotation.enable_annotation_reply_task.enable_annotation_reply_task[cab8e0e6-68b4-409d-968b-76797e10f132] received worker | 2025-10-10 11:48:16.172 | 2025-10-10 11:48:16.172 INFO [Dummy-26] [enable_annotation_reply_task.py:33] - Start add app annotation to index: f2e68177-ffcd-4073-9790-282e32c334c8 nginx | 2025-10-10 11:48:16.186 | 172.19.0.1 - - [10/Oct/2025:03:48:16 +0000] "POST /console/api/apps/f2e68177-ffcd-4073-9790-282e32c334c8/annotation-reply/enable HTTP/1.1" 200 73 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-" plugin_daemon | 2025-10-10 11:48:16.188 | [GIN] 2025/10/10 - 03:48:16 | 200 | 6.339006ms | 172.19.0.4 | GET "/plugin/76404d36-723b-44e8-bed2-e9d04c91e9d9/management/models?page=1&page_size=256" nginx | 2025-10-10 11:48:16.199 | 172.19.0.1 - - [10/Oct/2025:03:48:16 +0000] "GET /console/api/apps/f2e68177-ffcd-4073-9790-282e32c334c8/annotation-reply/enable/status/a51d02b4-b67d-46cf-bb95-331b2ed08ad8 HTTP/1.1" 200 88 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-" worker | 2025-10-10 11:48:16.673 | 2025-10-10 11:48:16.672 INFO [Dummy-26] [vector_factory.py:186] - start embedding 1 texts 1760068096.6728811 worker | 2025-10-10 11:48:16.673 | 2025-10-10 11:48:16.673 INFO [Dummy-26] [vector_factory.py:192] - Processing batch 1/1000 (1 texts) worker | 2025-10-10 11:48:16.675 | 2025-10-10 11:48:16.675 INFO [Dummy-26] [vector_factory.py:194] - Embedding batch 1/1000 took 0.0020935535430908203 s worker | 2025-10-10 11:48:16.689 | 2025-10-10 11:48:16.689 INFO [Dummy-26] [vector_factory.py:198] - Embedding 1 texts took 0.01626276969909668 s worker | 2025-10-10 11:48:16.690 | 2025-10-10 11:48:16.689 INFO [Dummy-26] [enable_annotation_reply_task.py:115] - App annotations added to index: f2e68177-ffcd-4073-9790-282e32c334c8 latency: 0.5173212859999694 worker | 2025-10-10 11:48:16.704 | 2025-10-10 11:48:16.703 INFO [Dummy-26] [trace.py:128] - Task tasks.annotation.enable_annotation_reply_task.enable_annotation_reply_task[cab8e0e6-68b4-409d-968b-76797e10f132] succeeded in 0.5317181689997597s: None nginx | 2025-10-10 11:48:19.216 | 172.19.0.1 - - [10/Oct/2025:03:48:19 +0000] "GET /console/api/apps/f2e68177-ffcd-4073-9790-282e32c334c8/annotation-reply/enable/status/a51d02b4-b67d-46cf-bb95-331b2ed08ad8 HTTP/1.1" 200 90 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-" nginx | 2025-10-10 11:48:19.235 | 172.19.0.1 - - [10/Oct/2025:03:48:19 +0000] "GET /console/api/apps/f2e68177-ffcd-4073-9790-282e32c334c8/annotation-setting HTTP/1.1" 200 18 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-" nginx | 2025-10-10 11:48:19.260 | 172.19.0.1 - - [10/Oct/2025:03:48:19 +0000] "GET /console/api/apps/f2e68177-ffcd-4073-9790-282e32c334c8/annotation-setting HTTP/1.1" 200 18 "http://localhost/app/f2e68177-ffcd-4073-9790-282e32c334c8/annotations" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36" "-" ``` ### ✔️ Expected Behavior Even when annotations already exist, the user should be able to enable the “Annotation Reply” feature. Enabling it should trigger any necessary initialization (e.g. embedding computation, indexing of existing annotations) behind the scenes so that the feature becomes active without requiring the annotation list to be empty. ### ❌ Actual Behavior When there are existing annotations, the toggle to enable “Annotation Reply” is does not take effect. The backend shows that vector indexing has been performed for the existing annotations. No visible errors in frontend UI or backend logs. Only after deleting all annotations does enabling “Annotation Reply” work as expected.
yindo added the 🐞 buggood first issue labels 2026-02-21 19:54:20 -05:00
yindo closed this issue 2026-02-21 19:54:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#18985