Skip to content

fix: put correct file type in langflow-less ingestion#1842

Merged
lucaseduoli merged 4 commits into
mainfrom
fix/langflow_ingest
Jun 11, 2026
Merged

fix: put correct file type in langflow-less ingestion#1842
lucaseduoli merged 4 commits into
mainfrom
fix/langflow_ingest

Conversation

@lucaseduoli

@lucaseduoli lucaseduoli commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

This pull request improves how temporary files are handled during file uploads by preserving the original file extensions, which helps with format detection. It also adds unit tests to ensure this behavior for both traditional and langflow upload ingestion tasks.

File Upload Improvements:

  • Temporary files are now created with the original file extension (if available) instead of always using .tmp, improving compatibility with downstream format detection [1] [2].

Testing Enhancements:

  • Added and updated unit tests in test_disable_ingest_setting.py to verify that the file extension is preserved for both traditional and langflow upload ingestion tasks, and to clean up temporary files after tests.

Dependency Updates:

  • Added os import to router.py to support file extension extraction.

Summary by CodeRabbit

  • Bug Fixes

    • File uploads now preserve original file extensions during processing, with automatic fallback for files that lack an extension.
  • Tests

    • Added/updated unit tests to verify preserved extensions and fallback behavior for both traditional and Langflow-style uploads.

@lucaseduoli lucaseduoli requested a review from mfortman11 June 11, 2026 17:55
@lucaseduoli lucaseduoli self-assigned this Jun 11, 2026
@github-actions github-actions Bot added backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) tests bug 🔴 Something isn't working. labels Jun 11, 2026
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jun 11, 2026
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5d975636-5992-4ad0-974e-3e4b0b37365f

📥 Commits

Reviewing files that changed from the base of the PR and between a22a419 and 8bd4ede.

📒 Files selected for processing (2)
  • src/api/router.py
  • tests/unit/config/test_disable_ingest_setting.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/api/router.py
  • tests/unit/config/test_disable_ingest_setting.py

Walkthrough

Both traditional and Langflow upload/ingest helpers now preserve the original uploaded file's extension when creating temporary files, falling back to a content-type-derived extension or .tmp. Tests assert preserved .txt, .pptx, and .pdf (mime fallback) suffixes and remove created temp files.

Changes

File Extension Preservation in Uploads

Layer / File(s) Summary
Temp file extension preservation in upload helpers
src/api/router.py
Adds mimetypes/os imports and updates both traditional and Langflow upload/ingest helpers to derive temp-file suffixes from the original upload filename's extension, fallback to content-type via get_file_extension and mimetypes.guess_extension, then ".tmp".
Test coverage for extension preservation
tests/unit/config/test_disable_ingest_setting.py
Extends test_traditional_upload_ingest_task to assert file paths preserve a .txt extension and cleans up temp files; adds test_langflow_upload_ingest_task to assert .pptx preservation and response fields; updates test_traditional_upload_ingest_mime_fallback to assert .pdf suffix derived from content_type, with cleanup.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • langflow-ai/openrag#1651: Both PRs change Langflow upload/ingest file handling around filename/extension behavior—main PR preserves the original temp-file extension when creating ingest/upload paths, while the retrieved PR centralizes Langflow's .txt.md filename and mimetype workaround.

Suggested reviewers

  • mfortman11
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: preserving correct file types during langflow-less (traditional) ingestion by using original file extensions instead of generic .tmp suffixes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/langflow_ingest

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jun 11, 2026
Comment thread src/api/router.py
# Generate unique temp file with the original extension to assist docling/format detection
suffix = os.path.splitext(upload_file.filename)[1] if upload_file.filename else ""
if not suffix:
suffix = ".tmp"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucaseduoli .tmp suffix will fail by default

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/api/router.py (1)

109-113: ⚡ Quick win

Extract duplicate extension logic into a helper function.

The extension-extraction logic (lines 109–113 in _traditional_upload_ingest_task and lines 214–217 in _langflow_upload_ingest_task) is identical. Extract it into a small helper function to eliminate duplication and establish a single source of truth.

♻️ Proposed refactor to extract helper function

Add a helper function at the module level:

def _get_temp_file_suffix(filename: str | None) -> str:
    """Extract file extension from filename for temp file suffix, fallback to .tmp."""
    suffix = os.path.splitext(filename)[1] if filename else ""
    return suffix if suffix else ".tmp"

Then replace both occurrences:

 # In _traditional_upload_ingest_task:
-                # Generate unique temp file with the original extension to assist docling/format detection
-                suffix = os.path.splitext(upload_file.filename)[1] if upload_file.filename else ""
-                if not suffix:
-                    suffix = ".tmp"
+                # Generate unique temp file with the original extension to assist docling/format detection
+                suffix = _get_temp_file_suffix(upload_file.filename)
                 temp_file = tempfile.NamedTemporaryFile(delete=False, suffix=suffix)
 # In _langflow_upload_ingest_task:
-                # Generate unique temp file with the original extension to assist docling/format detection
-                suffix = os.path.splitext(upload_file.filename)[1] if upload_file.filename else ""
-                if not suffix:
-                    suffix = ".tmp"
+                # Generate unique temp file with the original extension to assist docling/format detection
+                suffix = _get_temp_file_suffix(upload_file.filename)
                 temp_file = tempfile.NamedTemporaryFile(delete=False, suffix=suffix)
🤖 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/router.py` around lines 109 - 113, Duplicate extension extraction
appears in _traditional_upload_ingest_task and _langflow_upload_ingest_task;
extract this into a module-level helper named _get_temp_file_suffix(filename:
str | None) -> str that returns os.path.splitext(filename)[1] or ".tmp" when
empty, then replace the existing logic in both functions to call
_get_temp_file_suffix(upload_file.filename) and use its return value as the
suffix for tempfile.NamedTemporaryFile; ensure the new helper has a short
docstring and import os if not already present.
🤖 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.

Nitpick comments:
In `@src/api/router.py`:
- Around line 109-113: Duplicate extension extraction appears in
_traditional_upload_ingest_task and _langflow_upload_ingest_task; extract this
into a module-level helper named _get_temp_file_suffix(filename: str | None) ->
str that returns os.path.splitext(filename)[1] or ".tmp" when empty, then
replace the existing logic in both functions to call
_get_temp_file_suffix(upload_file.filename) and use its return value as the
suffix for tempfile.NamedTemporaryFile; ensure the new helper has a short
docstring and import os if not already present.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3d3f6e14-00b2-4624-8c95-f5f09e9bde5f

📥 Commits

Reviewing files that changed from the base of the PR and between 4ca787e and a22a419.

📒 Files selected for processing (2)
  • src/api/router.py
  • tests/unit/config/test_disable_ingest_setting.py

@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jun 11, 2026
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Jun 11, 2026

@edwinjosechittilappilly edwinjosechittilappilly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

@github-actions github-actions Bot added the lgtm label Jun 11, 2026
@lucaseduoli lucaseduoli merged commit 5bf8fe4 into main Jun 11, 2026
24 of 26 checks passed
@github-actions github-actions Bot deleted the fix/langflow_ingest branch June 11, 2026 20:49
edwinjosechittilappilly added a commit that referenced this pull request Jun 12, 2026
* sdk scripts

* Update main.py

* fix: put correct file type in langflow-less ingestion (#1842)

* FIxed no langflow ingestion

* style: ruff autofix (auto)

* add fallback for mime types

* style: ruff autofix (auto)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* feat: add Python SDK smoke-test suite for remote/IBM SaaS deployments

Standalone uv project under scripts/test_scripts/sdk/python that exercises
every openrag-sdk functionality (settings, models, documents, search, chat,
knowledge filters, error handling) against a remote instance using IBM SaaS
header auth (X-Username / X-Api-Key), with pass/fail/skip reporting to
console, markdown, JSON, and a run log.

* style: ruff autofix (auto)

* Potential fix for pull request finding 'CodeQL / Clear-text logging of sensitive information'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Lucas Oliveira <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
ricofurtado pushed a commit that referenced this pull request Jun 12, 2026
* sdk scripts

* Update main.py

* fix: put correct file type in langflow-less ingestion (#1842)

* FIxed no langflow ingestion

* style: ruff autofix (auto)

* add fallback for mime types

* style: ruff autofix (auto)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* feat: add Python SDK smoke-test suite for remote/IBM SaaS deployments

Standalone uv project under scripts/test_scripts/sdk/python that exercises
every openrag-sdk functionality (settings, models, documents, search, chat,
knowledge filters, error handling) against a remote instance using IBM SaaS
header auth (X-Username / X-Api-Key), with pass/fail/skip reporting to
console, markdown, JSON, and a run log.

* style: ruff autofix (auto)

* Potential fix for pull request finding 'CodeQL / Clear-text logging of sensitive information'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Lucas Oliveira <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
ricofurtado added a commit that referenced this pull request Jun 12, 2026
…dingly (#1851)

* fix: handle document processing errors and update task statuses accordingly

* fix: add OCR handling for raster images during file ingestion

* style: ruff autofix (auto)

* fix: google to support WEBHOOK_BASE_URL (#1849)

* Update connector.py

* update env in settings

* fix webhook url of sharepoint

* feat: crd report scaleddown phase status (#1846)

* crd report scaleddown phase status

* improve status message

* chore: release 0.4.0.dev0 of sdks (#1847)

* release 0.4.1 of sdks

* dev 0

* dev 0

* 0.4.0-dev0

* feat: sdk scripts (#1848)

* sdk scripts

* Update main.py

* fix: put correct file type in langflow-less ingestion (#1842)

* FIxed no langflow ingestion

* style: ruff autofix (auto)

* add fallback for mime types

* style: ruff autofix (auto)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* feat: add Python SDK smoke-test suite for remote/IBM SaaS deployments

Standalone uv project under scripts/test_scripts/sdk/python that exercises
every openrag-sdk functionality (settings, models, documents, search, chat,
knowledge filters, error handling) against a remote instance using IBM SaaS
header auth (X-Username / X-Api-Key), with pass/fail/skip reporting to
console, markdown, JSON, and a run log.

* style: ruff autofix (auto)

* Potential fix for pull request finding 'CodeQL / Clear-text logging of sensitive information'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Lucas Oliveira <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* style: ruff autofix (auto)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <[email protected]>
Co-authored-by: ming <[email protected]>
Co-authored-by: Lucas Oliveira <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Vchen7629 pushed a commit to Vchen7629/openrag that referenced this pull request Jun 15, 2026
* sdk scripts

* Update main.py

* fix: put correct file type in langflow-less ingestion (langflow-ai#1842)

* FIxed no langflow ingestion

* style: ruff autofix (auto)

* add fallback for mime types

* style: ruff autofix (auto)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* feat: add Python SDK smoke-test suite for remote/IBM SaaS deployments

Standalone uv project under scripts/test_scripts/sdk/python that exercises
every openrag-sdk functionality (settings, models, documents, search, chat,
knowledge filters, error handling) against a remote instance using IBM SaaS
header auth (X-Username / X-Api-Key), with pass/fail/skip reporting to
console, markdown, JSON, and a run log.

* style: ruff autofix (auto)

* Potential fix for pull request finding 'CodeQL / Clear-text logging of sensitive information'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Lucas Oliveira <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Vchen7629 pushed a commit to Vchen7629/openrag that referenced this pull request Jun 15, 2026
…dingly (langflow-ai#1851)

* fix: handle document processing errors and update task statuses accordingly

* fix: add OCR handling for raster images during file ingestion

* style: ruff autofix (auto)

* fix: google to support WEBHOOK_BASE_URL (langflow-ai#1849)

* Update connector.py

* update env in settings

* fix webhook url of sharepoint

* feat: crd report scaleddown phase status (langflow-ai#1846)

* crd report scaleddown phase status

* improve status message

* chore: release 0.4.0.dev0 of sdks (langflow-ai#1847)

* release 0.4.1 of sdks

* dev 0

* dev 0

* 0.4.0-dev0

* feat: sdk scripts (langflow-ai#1848)

* sdk scripts

* Update main.py

* fix: put correct file type in langflow-less ingestion (langflow-ai#1842)

* FIxed no langflow ingestion

* style: ruff autofix (auto)

* add fallback for mime types

* style: ruff autofix (auto)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* feat: add Python SDK smoke-test suite for remote/IBM SaaS deployments

Standalone uv project under scripts/test_scripts/sdk/python that exercises
every openrag-sdk functionality (settings, models, documents, search, chat,
knowledge filters, error handling) against a remote instance using IBM SaaS
header auth (X-Username / X-Api-Key), with pass/fail/skip reporting to
console, markdown, JSON, and a run log.

* style: ruff autofix (auto)

* Potential fix for pull request finding 'CodeQL / Clear-text logging of sensitive information'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Lucas Oliveira <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* style: ruff autofix (auto)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <[email protected]>
Co-authored-by: ming <[email protected]>
Co-authored-by: Lucas Oliveira <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
ricofurtado pushed a commit that referenced this pull request Jun 15, 2026
* sdk scripts

* Update main.py

* fix: put correct file type in langflow-less ingestion (#1842)

* FIxed no langflow ingestion

* style: ruff autofix (auto)

* add fallback for mime types

* style: ruff autofix (auto)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* feat: add Python SDK smoke-test suite for remote/IBM SaaS deployments

Standalone uv project under scripts/test_scripts/sdk/python that exercises
every openrag-sdk functionality (settings, models, documents, search, chat,
knowledge filters, error handling) against a remote instance using IBM SaaS
header auth (X-Username / X-Api-Key), with pass/fail/skip reporting to
console, markdown, JSON, and a run log.

* style: ruff autofix (auto)

* Potential fix for pull request finding 'CodeQL / Clear-text logging of sensitive information'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Lucas Oliveira <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
ricofurtado added a commit that referenced this pull request Jun 15, 2026
…dingly (#1851)

* fix: handle document processing errors and update task statuses accordingly

* fix: add OCR handling for raster images during file ingestion

* style: ruff autofix (auto)

* fix: google to support WEBHOOK_BASE_URL (#1849)

* Update connector.py

* update env in settings

* fix webhook url of sharepoint

* feat: crd report scaleddown phase status (#1846)

* crd report scaleddown phase status

* improve status message

* chore: release 0.4.0.dev0 of sdks (#1847)

* release 0.4.1 of sdks

* dev 0

* dev 0

* 0.4.0-dev0

* feat: sdk scripts (#1848)

* sdk scripts

* Update main.py

* fix: put correct file type in langflow-less ingestion (#1842)

* FIxed no langflow ingestion

* style: ruff autofix (auto)

* add fallback for mime types

* style: ruff autofix (auto)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* feat: add Python SDK smoke-test suite for remote/IBM SaaS deployments

Standalone uv project under scripts/test_scripts/sdk/python that exercises
every openrag-sdk functionality (settings, models, documents, search, chat,
knowledge filters, error handling) against a remote instance using IBM SaaS
header auth (X-Username / X-Api-Key), with pass/fail/skip reporting to
console, markdown, JSON, and a run log.

* style: ruff autofix (auto)

* Potential fix for pull request finding 'CodeQL / Clear-text logging of sensitive information'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Lucas Oliveira <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* style: ruff autofix (auto)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <[email protected]>
Co-authored-by: ming <[email protected]>
Co-authored-by: Lucas Oliveira <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
lucaseduoli added a commit that referenced this pull request Jun 18, 2026
* FIxed no langflow ingestion

* style: ruff autofix (auto)

* add fallback for mime types

* style: ruff autofix (auto)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
ricofurtado added a commit that referenced this pull request Jun 23, 2026
…nectors 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>
ricofurtado added a commit that referenced this pull request Jul 3, 2026
…nectors (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>
ricofurtado added a commit that referenced this pull request Jul 5, 2026
…to release-saas-ga-0.6.2 (#2021)

* 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>
(cherry picked from commit 286e9db)

* 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 <[email protected]>
(cherry picked from commit 36f115f)

* 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>
(cherry picked from commit 79b33f0)

* 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 <[email protected]>
Co-authored-by: Edwin Jose <[email protected]>
(cherry picked from commit 4c6acd8)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: Lucas Oliveira <[email protected]>
Co-authored-by: Edwin Jose <[email protected]>
lucaseduoli added a commit that referenced this pull request Jul 7, 2026
…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 <[email protected]>

* 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 <[email protected]>

* update component code

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: CodeRabbit <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Edwin Jose <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
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 <[email protected]>

* fix: removed unused llm_provider arg from _update_langflow_system_prompt

Signed-off-by: vchen7629 <[email protected]>

* test: add unit tests for update_chat_flow_system_prompt

Signed-off-by: vchen7629 <[email protected]>

* style: ruff autofix (auto)

* fix(test): resolve flow path relative to repo root in test_langflow_agent_system_prompt

Signed-off-by: vchen7629 <[email protected]>

* style: ruff autofix (auto)

---------

Signed-off-by: vchen7629 <[email protected]>
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 <[email protected]>

* fix: resolve Pydantic delta serialization warnings in agent streaming (#2005)

* fix: updated agent model dump to exclude delta field

Signed-off-by: vchen7629 <[email protected]>

* 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 <[email protected]>

* style: ruff autofix (auto)

* test: tighten delta warning assertion to match specific Pydantic error

Signed-off-by: vchen7629 <[email protected]>

* style: ruff autofix (auto)

---------

Signed-off-by: vchen7629 <[email protected]>
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 <[email protected]>

* style: ruff autofix (auto)

* fix: added missing status_code

Signed-off-by: vchen7629 <[email protected]>

* style: ruff autofix (auto)

---------

Signed-off-by: vchen7629 <[email protected]>
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 <[email protected]>
Co-authored-by: Gautham N Pai <[email protected]>
Co-authored-by: Wallgau <[email protected]>
Co-authored-by: Olfa Maslah <[email protected]>
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 <[email protected]>
Co-authored-by: Rico Furtado <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: Edwin Jose <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mike Fortman <[email protected]>
Co-authored-by: hunterxtang <[email protected]>
Co-authored-by: NishadA05 <[email protected]>
Co-authored-by: Zephyrus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) bug 🔴 Something isn't working. lgtm tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants