fix: report actual synced connection count in connector_sync (#1547)#2006
Conversation
WalkthroughThe connector_sync endpoint response was modified to report connections_synced based on the number of dispatched task_ids rather than active connections, with a corresponding singular message wording. A new unit test validates this fix using mocked multiple connections with a single successful authentication. ChangesConnector Sync Response Fix
Estimated code review effort: 1 (Trivial) | ~5 minutes PoemA rabbit counted connections with glee, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/api/connectors.py (1)
1194-1200: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winMessage hardcodes "1" but
connections_syncedcan be 2.The
bucket_filterbranch can push two entries ontotask_ids(new_ids batch at line 1039 and changed_ids batch at line 1049), solen(task_ids)can be2while the message text is hardcoded tof"Started syncing files from 1 {connector_type} connection". This produces an inconsistent, misleading response (e.g.connections_synced: 2alongside"1 google_drive connection"), and the singular wording is also grammatically wrong when the count isn't 1. This is exactly the discrepancy flagged in the PR description itself as a residual risk from thebucket_filtertwo-batch behavior.🐛 Proposed fix to keep message and count consistent
- "message": f"Started syncing files from 1 {connector_type} connection", + "message": ( + f"Started syncing files from {len(task_ids)} {connector_type} " + f"connection{'s' if len(task_ids) != 1 else ''}" + ), "connections_synced": len(task_ids),🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/api/connectors.py` around lines 1194 - 1200, The response message in the JSONResponse is hardcoded to “1” even though task_ids can contain more than one synced connection, which makes it inconsistent with connections_synced. Update the message construction in the connector sync response to use the actual count from len(task_ids) and choose singular/plural wording appropriately. Keep the fix localized to the return JSONResponse block and ensure the text matches the value reported by task_ids and connections_synced.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/api/connectors.py`:
- Around line 1194-1200: The response message in the JSONResponse is hardcoded
to “1” even though task_ids can contain more than one synced connection, which
makes it inconsistent with connections_synced. Update the message construction
in the connector sync response to use the actual count from len(task_ids) and
choose singular/plural wording appropriately. Keep the fix localized to the
return JSONResponse block and ensure the text matches the value reported by
task_ids and connections_synced.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 280c866e-2b1a-4961-a849-00094f348a7e
📒 Files selected for processing (2)
src/api/connectors.pytests/unit/api/test_connector_sync_response.py
…model option (#2031) * fix: remediate image_scan CVEs in backend, frontend, and langflow images (#2000) * fix light color text catergory chips in light mode (#2013) Co-authored-by: Olfa Maslah <olfamaslah@Olfas-MacBook-Pro.local> * fix: upgraded version of docling (#1995) * changed version of docling * fix logs not being the correct ones * go back to sequential building to save space * add cache to builds * remove single use results from docling manager * revert single use results * change the ray tenant id header * added env * changed cache to hit if no changes were made * fix hash for cache * style: ruff autofix (auto) * fixed coderabbit * style: ruff autofix (auto) * added comment on docling manager * style: ruff autofix (auto) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * feat: add chunk level page source (#2015) * Changed export docling document to append page number * update result on frontend to append page number * document how to get page number in readmes * Update flows/components/export_docling_document.py Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update flows/components/export_docling_document.py Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix: apply CodeRabbit auto-fixes Fixed 1 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai> * update component code --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai> * fix: error in skip duplicates functionality for folder ingest for connectors (backport of #1941) (#2018) * fix: error in skip duplicates functionality for folder ingest for connectors 75616(#1842) (#1941) * fix: enhance duplicate handling and indexing for connector file uploads * style: ruff autofix (auto) * fix: improve duplicate handling in connector sync functionality * chore: trigger CodeRabbit --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> (cherry picked from commit effaf02) * style: ruff autofix (auto) * fix: remove duplicate test definitions from main merge The automated merge-from-main on this branch concatenated two tests (test_connector_processor_indexes_cleaned_filename, test_langflow_connector_processor_uses_cleaned_filename) that already existed under both names, tripping ruff F811. Keep one copy of each, preferring the version wired with connector_id_exists=True to match current check_document_exists behavior. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: Ingestion of buckets not working right after connection is tested - CPD #75506 (#1942) (#2019) * fix: update bucket ingestion messages for clarity and consistency * fix: guard bucket pre-selection against connection ID mismatch The defaults query returns the first S3/COS connection regardless of active status. Only pre-select saved bucket_names when the defaults connection_id matches the current connector.connectionId to avoid seeding the wrong buckets if a stale connection exists alongside the active one. * fix: prevent defaults from overwriting user bucket selections Two issues in the initial-selection effect: 1. hasAppliedInitial was only set when valid buckets were found, leaving the effect live across bucket refreshes and allowing stale defaults to overwrite selections made after a refetch. 2. No guard against the async race where buckets loads before initialSelectedBuckets: user clicks buckets, defaults arrive later and silently overwrite them. Fix: mark hasAppliedInitial unconditionally on first evaluation, and only apply defaults when selectedBuckets is still empty (user hasn't acted yet). --------- (cherry picked from commit f3823b8) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: handle orphan files and return appropriate responses when syncing connectors (#1785) (#2016) * feat: handle orphan files and return appropriate responses when syncing connectors * feat: refactor GoogleDriveOAuth to separate required scopes and add handling for missing optional group scopes in tests * style: ruff autofix (auto) * feat: add handling for skipped files and warnings in task processing and UI components --------- (cherry picked from commit aca865a) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: enhance error handling for document processing and add OCR requirement check for image files (#1859) (#2017) * fix: enhance error handling for document processing and add OCR requirement check for image files * style: ruff autofix (auto) * remove clickhouse connect from langflow image (#1801) * chore: fix ci (#1889) * Update processors.py * test fix * fix ci --------- (cherry picked from commit a286581) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: bump golang.org/x/net to v0.55.0 to remediate CVE-2026-25680 and CVE-2026-39821 (#2014) * feat: add new design for messages and add inline references (#2020) * update opensearch multimodal and flows to support parser, chunk size and chunk overlap * update backend to support citations and chunk metadata * update frontend to support citations and metadata, implement new design for assistant message * changed the prompt for the agent * changed the prompt for the agent * remove hallucinated chunk references * adjust design of citations and where popover appears * adjusted design for message, popover and cards * fix React Doctor picks * fix: apply CodeRabbit auto-fixes Fixed 5 file(s) based on 4 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai> * style: apply biome auto-fixes [skip ci] * updated colors in ibm mode * fixed react doctor picks * added correct type and validation for function calls * remove style for message when on onboarding * fix message not being w full * remove search query in end of the message * change popup to use shadcn popover * fix coderabbit's suggestion * increase prompt limit --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * apply new settings on retry (#2010) * fix: preserve HTTPException status in update_docling_preset (#1586) (#2004) * fix: report actual synced connection count in connector_sync (#1547) (#2006) * fix: restore LLM model values in reapply_all_settings fallback (#1587) (#2008) * fix: prevent partial matches for exact token searches (#2003) * fix: prevent partial matches for exact token searches (#1937) * style: ruff autofix (auto) * chore: remove unused json import --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: target agent component when updating chat flow system prompt (#2001) * fix: target langflow agent component for system prompt update instead of provider LLM component Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * fix: removed unused llm_provider arg from _update_langflow_system_prompt Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * test: add unit tests for update_chat_flow_system_prompt Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) * fix(test): resolve flow path relative to repo root in test_langflow_agent_system_prompt Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: replaced hardcoded docker.io prefix with a env variable prefix for private repo compatibility (#2002) Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * fix: resolve Pydantic delta serialization warnings in agent streaming (#2005) * fix: updated agent model dump to exclude delta field Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * test: added regression unit test to verify response field + no warnings * style: ruff autofix (auto) * test: added additional unit test to verify that model_dump without exclusion raises the warning Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) * test: tighten delta warning assertion to match specific Pydantic error Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: prevent exception details from leaking in API error responses (#2007) * fix: removed str(e) in exceptions to prevent internals from leaking Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) * fix: added missing status_code Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Changed docling options to include local support and be shown in the Langflow tab * style: ruff autofix (auto) * enable ollama and delete unused file * fix next lint --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: Gautham N Pai <119022878+gnPy@users.noreply.github.com> Co-authored-by: Wallgau <46035189+Wallgau@users.noreply.github.com> Co-authored-by: Olfa Maslah <olfamaslah@Olfas-MacBook-Pro.local> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai> Co-authored-by: Rico Furtado <hfurtado@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Mike Fortman <mfortman11@gmail.com> Co-authored-by: hunterxtang <38674961+hunterxtang@users.noreply.github.com> Co-authored-by: NishadA05 <168224983+NishadA05@users.noreply.github.com> Co-authored-by: Zephyrus <114184635+Vchen7629@users.noreply.github.com>
* docling ingest vlms * docling tab * resue proivders dropdown * style: ruff autofix (auto) * style: ruff autofix (auto) * fix: added docling settings under knowledge settings and added local model option (#2031) * fix: remediate image_scan CVEs in backend, frontend, and langflow images (#2000) * fix light color text catergory chips in light mode (#2013) Co-authored-by: Olfa Maslah <olfamaslah@Olfas-MacBook-Pro.local> * fix: upgraded version of docling (#1995) * changed version of docling * fix logs not being the correct ones * go back to sequential building to save space * add cache to builds * remove single use results from docling manager * revert single use results * change the ray tenant id header * added env * changed cache to hit if no changes were made * fix hash for cache * style: ruff autofix (auto) * fixed coderabbit * style: ruff autofix (auto) * added comment on docling manager * style: ruff autofix (auto) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * feat: add chunk level page source (#2015) * Changed export docling document to append page number * update result on frontend to append page number * document how to get page number in readmes * Update flows/components/export_docling_document.py Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update flows/components/export_docling_document.py Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix: apply CodeRabbit auto-fixes Fixed 1 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai> * update component code --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai> * fix: error in skip duplicates functionality for folder ingest for connectors (backport of #1941) (#2018) * fix: error in skip duplicates functionality for folder ingest for connectors 75616(#1842) (#1941) * fix: enhance duplicate handling and indexing for connector file uploads * style: ruff autofix (auto) * fix: improve duplicate handling in connector sync functionality * chore: trigger CodeRabbit --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> (cherry picked from commit effaf02) * style: ruff autofix (auto) * fix: remove duplicate test definitions from main merge The automated merge-from-main on this branch concatenated two tests (test_connector_processor_indexes_cleaned_filename, test_langflow_connector_processor_uses_cleaned_filename) that already existed under both names, tripping ruff F811. Keep one copy of each, preferring the version wired with connector_id_exists=True to match current check_document_exists behavior. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: Ingestion of buckets not working right after connection is tested - CPD #75506 (#1942) (#2019) * fix: update bucket ingestion messages for clarity and consistency * fix: guard bucket pre-selection against connection ID mismatch The defaults query returns the first S3/COS connection regardless of active status. Only pre-select saved bucket_names when the defaults connection_id matches the current connector.connectionId to avoid seeding the wrong buckets if a stale connection exists alongside the active one. * fix: prevent defaults from overwriting user bucket selections Two issues in the initial-selection effect: 1. hasAppliedInitial was only set when valid buckets were found, leaving the effect live across bucket refreshes and allowing stale defaults to overwrite selections made after a refetch. 2. No guard against the async race where buckets loads before initialSelectedBuckets: user clicks buckets, defaults arrive later and silently overwrite them. Fix: mark hasAppliedInitial unconditionally on first evaluation, and only apply defaults when selectedBuckets is still empty (user hasn't acted yet). --------- (cherry picked from commit f3823b8) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: handle orphan files and return appropriate responses when syncing connectors (#1785) (#2016) * feat: handle orphan files and return appropriate responses when syncing connectors * feat: refactor GoogleDriveOAuth to separate required scopes and add handling for missing optional group scopes in tests * style: ruff autofix (auto) * feat: add handling for skipped files and warnings in task processing and UI components --------- (cherry picked from commit aca865a) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: enhance error handling for document processing and add OCR requirement check for image files (#1859) (#2017) * fix: enhance error handling for document processing and add OCR requirement check for image files * style: ruff autofix (auto) * remove clickhouse connect from langflow image (#1801) * chore: fix ci (#1889) * Update processors.py * test fix * fix ci --------- (cherry picked from commit a286581) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: bump golang.org/x/net to v0.55.0 to remediate CVE-2026-25680 and CVE-2026-39821 (#2014) * feat: add new design for messages and add inline references (#2020) * update opensearch multimodal and flows to support parser, chunk size and chunk overlap * update backend to support citations and chunk metadata * update frontend to support citations and metadata, implement new design for assistant message * changed the prompt for the agent * changed the prompt for the agent * remove hallucinated chunk references * adjust design of citations and where popover appears * adjusted design for message, popover and cards * fix React Doctor picks * fix: apply CodeRabbit auto-fixes Fixed 5 file(s) based on 4 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai> * style: apply biome auto-fixes [skip ci] * updated colors in ibm mode * fixed react doctor picks * added correct type and validation for function calls * remove style for message when on onboarding * fix message not being w full * remove search query in end of the message * change popup to use shadcn popover * fix coderabbit's suggestion * increase prompt limit --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * apply new settings on retry (#2010) * fix: preserve HTTPException status in update_docling_preset (#1586) (#2004) * fix: report actual synced connection count in connector_sync (#1547) (#2006) * fix: restore LLM model values in reapply_all_settings fallback (#1587) (#2008) * fix: prevent partial matches for exact token searches (#2003) * fix: prevent partial matches for exact token searches (#1937) * style: ruff autofix (auto) * chore: remove unused json import --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: target agent component when updating chat flow system prompt (#2001) * fix: target langflow agent component for system prompt update instead of provider LLM component Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * fix: removed unused llm_provider arg from _update_langflow_system_prompt Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * test: add unit tests for update_chat_flow_system_prompt Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) * fix(test): resolve flow path relative to repo root in test_langflow_agent_system_prompt Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: replaced hardcoded docker.io prefix with a env variable prefix for private repo compatibility (#2002) Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * fix: resolve Pydantic delta serialization warnings in agent streaming (#2005) * fix: updated agent model dump to exclude delta field Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * test: added regression unit test to verify response field + no warnings * style: ruff autofix (auto) * test: added additional unit test to verify that model_dump without exclusion raises the warning Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) * test: tighten delta warning assertion to match specific Pydantic error Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: prevent exception details from leaking in API error responses (#2007) * fix: removed str(e) in exceptions to prevent internals from leaking Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) * fix: added missing status_code Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Changed docling options to include local support and be shown in the Langflow tab * style: ruff autofix (auto) * enable ollama and delete unused file * fix next lint --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: Gautham N Pai <119022878+gnPy@users.noreply.github.com> Co-authored-by: Wallgau <46035189+Wallgau@users.noreply.github.com> Co-authored-by: Olfa Maslah <olfamaslah@Olfas-MacBook-Pro.local> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai> Co-authored-by: Rico Furtado <hfurtado@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Mike Fortman <mfortman11@gmail.com> Co-authored-by: hunterxtang <38674961+hunterxtang@users.noreply.github.com> Co-authored-by: NishadA05 <168224983+NishadA05@users.noreply.github.com> Co-authored-by: Zephyrus <114184635+Vchen7629@users.noreply.github.com> * Close accordian when pic desc is off * coderabbit comments * react-doctor * react-dr state fix * coderabbit fixes * Add vlm feature flag * test fix --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Mike Fortman <mfortman11@gmail.com> Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Gautham N Pai <119022878+gnPy@users.noreply.github.com> Co-authored-by: Wallgau <46035189+Wallgau@users.noreply.github.com> Co-authored-by: Olfa Maslah <olfamaslah@Olfas-MacBook-Pro.local> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai> Co-authored-by: Rico Furtado <hfurtado@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: hunterxtang <38674961+hunterxtang@users.noreply.github.com> Co-authored-by: NishadA05 <168224983+NishadA05@users.noreply.github.com> Co-authored-by: Zephyrus <114184635+Vchen7629@users.noreply.github.com>
* docling ingest vlms * docling tab * resue proivders dropdown * style: ruff autofix (auto) * style: ruff autofix (auto) * fix: added docling settings under knowledge settings and added local model option (#2031) * fix: remediate image_scan CVEs in backend, frontend, and langflow images (#2000) * fix light color text catergory chips in light mode (#2013) Co-authored-by: Olfa Maslah <olfamaslah@Olfas-MacBook-Pro.local> * fix: upgraded version of docling (#1995) * changed version of docling * fix logs not being the correct ones * go back to sequential building to save space * add cache to builds * remove single use results from docling manager * revert single use results * change the ray tenant id header * added env * changed cache to hit if no changes were made * fix hash for cache * style: ruff autofix (auto) * fixed coderabbit * style: ruff autofix (auto) * added comment on docling manager * style: ruff autofix (auto) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * feat: add chunk level page source (#2015) * Changed export docling document to append page number * update result on frontend to append page number * document how to get page number in readmes * Update flows/components/export_docling_document.py Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update flows/components/export_docling_document.py Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix: apply CodeRabbit auto-fixes Fixed 1 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai> * update component code --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai> * fix: error in skip duplicates functionality for folder ingest for connectors (backport of #1941) (#2018) * fix: error in skip duplicates functionality for folder ingest for connectors 75616(#1842) (#1941) * fix: enhance duplicate handling and indexing for connector file uploads * style: ruff autofix (auto) * fix: improve duplicate handling in connector sync functionality * chore: trigger CodeRabbit --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> (cherry picked from commit effaf02) * style: ruff autofix (auto) * fix: remove duplicate test definitions from main merge The automated merge-from-main on this branch concatenated two tests (test_connector_processor_indexes_cleaned_filename, test_langflow_connector_processor_uses_cleaned_filename) that already existed under both names, tripping ruff F811. Keep one copy of each, preferring the version wired with connector_id_exists=True to match current check_document_exists behavior. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: Ingestion of buckets not working right after connection is tested - CPD #75506 (#1942) (#2019) * fix: update bucket ingestion messages for clarity and consistency * fix: guard bucket pre-selection against connection ID mismatch The defaults query returns the first S3/COS connection regardless of active status. Only pre-select saved bucket_names when the defaults connection_id matches the current connector.connectionId to avoid seeding the wrong buckets if a stale connection exists alongside the active one. * fix: prevent defaults from overwriting user bucket selections Two issues in the initial-selection effect: 1. hasAppliedInitial was only set when valid buckets were found, leaving the effect live across bucket refreshes and allowing stale defaults to overwrite selections made after a refetch. 2. No guard against the async race where buckets loads before initialSelectedBuckets: user clicks buckets, defaults arrive later and silently overwrite them. Fix: mark hasAppliedInitial unconditionally on first evaluation, and only apply defaults when selectedBuckets is still empty (user hasn't acted yet). --------- (cherry picked from commit f3823b8) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: handle orphan files and return appropriate responses when syncing connectors (#1785) (#2016) * feat: handle orphan files and return appropriate responses when syncing connectors * feat: refactor GoogleDriveOAuth to separate required scopes and add handling for missing optional group scopes in tests * style: ruff autofix (auto) * feat: add handling for skipped files and warnings in task processing and UI components --------- (cherry picked from commit aca865a) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: enhance error handling for document processing and add OCR requirement check for image files (#1859) (#2017) * fix: enhance error handling for document processing and add OCR requirement check for image files * style: ruff autofix (auto) * remove clickhouse connect from langflow image (#1801) * chore: fix ci (#1889) * Update processors.py * test fix * fix ci --------- (cherry picked from commit a286581) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: bump golang.org/x/net to v0.55.0 to remediate CVE-2026-25680 and CVE-2026-39821 (#2014) * feat: add new design for messages and add inline references (#2020) * update opensearch multimodal and flows to support parser, chunk size and chunk overlap * update backend to support citations and chunk metadata * update frontend to support citations and metadata, implement new design for assistant message * changed the prompt for the agent * changed the prompt for the agent * remove hallucinated chunk references * adjust design of citations and where popover appears * adjusted design for message, popover and cards * fix React Doctor picks * fix: apply CodeRabbit auto-fixes Fixed 5 file(s) based on 4 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai> * style: apply biome auto-fixes [skip ci] * updated colors in ibm mode * fixed react doctor picks * added correct type and validation for function calls * remove style for message when on onboarding * fix message not being w full * remove search query in end of the message * change popup to use shadcn popover * fix coderabbit's suggestion * increase prompt limit --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * apply new settings on retry (#2010) * fix: preserve HTTPException status in update_docling_preset (#1586) (#2004) * fix: report actual synced connection count in connector_sync (#1547) (#2006) * fix: restore LLM model values in reapply_all_settings fallback (#1587) (#2008) * fix: prevent partial matches for exact token searches (#2003) * fix: prevent partial matches for exact token searches (#1937) * style: ruff autofix (auto) * chore: remove unused json import --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: target agent component when updating chat flow system prompt (#2001) * fix: target langflow agent component for system prompt update instead of provider LLM component Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * fix: removed unused llm_provider arg from _update_langflow_system_prompt Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * test: add unit tests for update_chat_flow_system_prompt Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) * fix(test): resolve flow path relative to repo root in test_langflow_agent_system_prompt Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: replaced hardcoded docker.io prefix with a env variable prefix for private repo compatibility (#2002) Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * fix: resolve Pydantic delta serialization warnings in agent streaming (#2005) * fix: updated agent model dump to exclude delta field Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * test: added regression unit test to verify response field + no warnings * style: ruff autofix (auto) * test: added additional unit test to verify that model_dump without exclusion raises the warning Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) * test: tighten delta warning assertion to match specific Pydantic error Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: prevent exception details from leaking in API error responses (#2007) * fix: removed str(e) in exceptions to prevent internals from leaking Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) * fix: added missing status_code Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Changed docling options to include local support and be shown in the Langflow tab * style: ruff autofix (auto) * enable ollama and delete unused file * fix next lint --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: Gautham N Pai <119022878+gnPy@users.noreply.github.com> Co-authored-by: Wallgau <46035189+Wallgau@users.noreply.github.com> Co-authored-by: Olfa Maslah <olfamaslah@Olfas-MacBook-Pro.local> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai> Co-authored-by: Rico Furtado <hfurtado@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Mike Fortman <mfortman11@gmail.com> Co-authored-by: hunterxtang <38674961+hunterxtang@users.noreply.github.com> Co-authored-by: NishadA05 <168224983+NishadA05@users.noreply.github.com> Co-authored-by: Zephyrus <114184635+Vchen7629@users.noreply.github.com> * Close accordian when pic desc is off * coderabbit comments * react-doctor * react-dr state fix * coderabbit fixes * Add vlm feature flag * test fix --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Mike Fortman <mfortman11@gmail.com> Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Gautham N Pai <119022878+gnPy@users.noreply.github.com> Co-authored-by: Wallgau <46035189+Wallgau@users.noreply.github.com> Co-authored-by: Olfa Maslah <olfamaslah@Olfas-MacBook-Pro.local> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai> Co-authored-by: Rico Furtado <hfurtado@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: hunterxtang <38674961+hunterxtang@users.noreply.github.com> Co-authored-by: NishadA05 <168224983+NishadA05@users.noreply.github.com> Co-authored-by: Zephyrus <114184635+Vchen7629@users.noreply.github.com>
* docling ingest vlms * docling tab * resue proivders dropdown * style: ruff autofix (auto) * style: ruff autofix (auto) * fix: added docling settings under knowledge settings and added local model option (#2031) * fix: remediate image_scan CVEs in backend, frontend, and langflow images (#2000) * fix light color text catergory chips in light mode (#2013) Co-authored-by: Olfa Maslah <olfamaslah@Olfas-MacBook-Pro.local> * fix: upgraded version of docling (#1995) * changed version of docling * fix logs not being the correct ones * go back to sequential building to save space * add cache to builds * remove single use results from docling manager * revert single use results * change the ray tenant id header * added env * changed cache to hit if no changes were made * fix hash for cache * style: ruff autofix (auto) * fixed coderabbit * style: ruff autofix (auto) * added comment on docling manager * style: ruff autofix (auto) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * feat: add chunk level page source (#2015) * Changed export docling document to append page number * update result on frontend to append page number * document how to get page number in readmes * Update flows/components/export_docling_document.py Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update flows/components/export_docling_document.py Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix: apply CodeRabbit auto-fixes Fixed 1 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai> * update component code --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai> * fix: error in skip duplicates functionality for folder ingest for connectors (backport of #1941) (#2018) * fix: error in skip duplicates functionality for folder ingest for connectors 75616(#1842) (#1941) * fix: enhance duplicate handling and indexing for connector file uploads * style: ruff autofix (auto) * fix: improve duplicate handling in connector sync functionality * chore: trigger CodeRabbit --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> (cherry picked from commit effaf02) * style: ruff autofix (auto) * fix: remove duplicate test definitions from main merge The automated merge-from-main on this branch concatenated two tests (test_connector_processor_indexes_cleaned_filename, test_langflow_connector_processor_uses_cleaned_filename) that already existed under both names, tripping ruff F811. Keep one copy of each, preferring the version wired with connector_id_exists=True to match current check_document_exists behavior. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: Ingestion of buckets not working right after connection is tested - CPD #75506 (#1942) (#2019) * fix: update bucket ingestion messages for clarity and consistency * fix: guard bucket pre-selection against connection ID mismatch The defaults query returns the first S3/COS connection regardless of active status. Only pre-select saved bucket_names when the defaults connection_id matches the current connector.connectionId to avoid seeding the wrong buckets if a stale connection exists alongside the active one. * fix: prevent defaults from overwriting user bucket selections Two issues in the initial-selection effect: 1. hasAppliedInitial was only set when valid buckets were found, leaving the effect live across bucket refreshes and allowing stale defaults to overwrite selections made after a refetch. 2. No guard against the async race where buckets loads before initialSelectedBuckets: user clicks buckets, defaults arrive later and silently overwrite them. Fix: mark hasAppliedInitial unconditionally on first evaluation, and only apply defaults when selectedBuckets is still empty (user hasn't acted yet). --------- (cherry picked from commit f3823b8) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: handle orphan files and return appropriate responses when syncing connectors (#1785) (#2016) * feat: handle orphan files and return appropriate responses when syncing connectors * feat: refactor GoogleDriveOAuth to separate required scopes and add handling for missing optional group scopes in tests * style: ruff autofix (auto) * feat: add handling for skipped files and warnings in task processing and UI components --------- (cherry picked from commit aca865a) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: enhance error handling for document processing and add OCR requirement check for image files (#1859) (#2017) * fix: enhance error handling for document processing and add OCR requirement check for image files * style: ruff autofix (auto) * remove clickhouse connect from langflow image (#1801) * chore: fix ci (#1889) * Update processors.py * test fix * fix ci --------- (cherry picked from commit a286581) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> * fix: bump golang.org/x/net to v0.55.0 to remediate CVE-2026-25680 and CVE-2026-39821 (#2014) * feat: add new design for messages and add inline references (#2020) * update opensearch multimodal and flows to support parser, chunk size and chunk overlap * update backend to support citations and chunk metadata * update frontend to support citations and metadata, implement new design for assistant message * changed the prompt for the agent * changed the prompt for the agent * remove hallucinated chunk references * adjust design of citations and where popover appears * adjusted design for message, popover and cards * fix React Doctor picks * fix: apply CodeRabbit auto-fixes Fixed 5 file(s) based on 4 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai> * style: apply biome auto-fixes [skip ci] * updated colors in ibm mode * fixed react doctor picks * added correct type and validation for function calls * remove style for message when on onboarding * fix message not being w full * remove search query in end of the message * change popup to use shadcn popover * fix coderabbit's suggestion * increase prompt limit --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * apply new settings on retry (#2010) * fix: preserve HTTPException status in update_docling_preset (#1586) (#2004) * fix: report actual synced connection count in connector_sync (#1547) (#2006) * fix: restore LLM model values in reapply_all_settings fallback (#1587) (#2008) * fix: prevent partial matches for exact token searches (#2003) * fix: prevent partial matches for exact token searches (#1937) * style: ruff autofix (auto) * chore: remove unused json import --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: target agent component when updating chat flow system prompt (#2001) * fix: target langflow agent component for system prompt update instead of provider LLM component Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * fix: removed unused llm_provider arg from _update_langflow_system_prompt Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * test: add unit tests for update_chat_flow_system_prompt Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) * fix(test): resolve flow path relative to repo root in test_langflow_agent_system_prompt Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: replaced hardcoded docker.io prefix with a env variable prefix for private repo compatibility (#2002) Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * fix: resolve Pydantic delta serialization warnings in agent streaming (#2005) * fix: updated agent model dump to exclude delta field Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * test: added regression unit test to verify response field + no warnings * style: ruff autofix (auto) * test: added additional unit test to verify that model_dump without exclusion raises the warning Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) * test: tighten delta warning assertion to match specific Pydantic error Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fix: prevent exception details from leaking in API error responses (#2007) * fix: removed str(e) in exceptions to prevent internals from leaking Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) * fix: added missing status_code Signed-off-by: vchen7629 <chenvincent7629@gmail.com> * style: ruff autofix (auto) --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Changed docling options to include local support and be shown in the Langflow tab * style: ruff autofix (auto) * enable ollama and delete unused file * fix next lint --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: Gautham N Pai <119022878+gnPy@users.noreply.github.com> Co-authored-by: Wallgau <46035189+Wallgau@users.noreply.github.com> Co-authored-by: Olfa Maslah <olfamaslah@Olfas-MacBook-Pro.local> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai> Co-authored-by: Rico Furtado <hfurtado@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Mike Fortman <mfortman11@gmail.com> Co-authored-by: hunterxtang <38674961+hunterxtang@users.noreply.github.com> Co-authored-by: NishadA05 <168224983+NishadA05@users.noreply.github.com> Co-authored-by: Zephyrus <114184635+Vchen7629@users.noreply.github.com> * Close accordian when pic desc is off * coderabbit comments * react-doctor * react-dr state fix * coderabbit fixes * Add vlm feature flag * test fix --------- Signed-off-by: vchen7629 <chenvincent7629@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Mike Fortman <mfortman11@gmail.com> Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Co-authored-by: Gautham N Pai <119022878+gnPy@users.noreply.github.com> Co-authored-by: Wallgau <46035189+Wallgau@users.noreply.github.com> Co-authored-by: Olfa Maslah <olfamaslah@Olfas-MacBook-Pro.local> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai> Co-authored-by: Rico Furtado <hfurtado@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: hunterxtang <38674961+hunterxtang@users.noreply.github.com> Co-authored-by: NishadA05 <168224983+NishadA05@users.noreply.github.com> Co-authored-by: Zephyrus <114184635+Vchen7629@users.noreply.github.com>
Fixes #1547 on main. Clean cherry-pick of #1930 (merged into release-0.5.1); applies without conflicts and the regression test passes unmodified against main's current connector_sync (and fails with assert 3 == 1 without the fix).
Two notes for reviewers: (1) since 0.5.1, main's bucket_filter path can populate task_ids with two batches (new + changed) from the single working connection, so connections_synced: len(task_ids) can read 2 on that path even though one connection was synced — happy to hardcode 1 instead if preferred; (2) per @lucaseduoli's note on #1930 that the test's hardcoded 1 makes it tautological, I'm fine dropping or tightening the test if that's the consensus — kept it for parity with what was approved there.
Summary by CodeRabbit