Skip to content

Fix: model list - #15905

Merged
wangq8 merged 19 commits into
infiniflow:mainfrom
Lynn-Inf:fix/model-list
Jun 10, 2026
Merged

wangq8 merged 19 commits into
infiniflow:mainfrom
Lynn-Inf:fix/model-list

Conversation

@Lynn-Inf

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Set OpenDataLoader and call in parser and naive

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. labels Jun 10, 2026
@coderabbitai

coderabbitai Bot commented Jun 10, 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e23cce13-1f91-4686-8e8b-493237ad2325

📥 Commits

Reviewing files that changed from the base of the PR and between 8e17a12 and 2dac976.

📒 Files selected for processing (3)
  • rag/app/naive.py
  • rag/flow/parser/parser.py
  • web/src/pages/user-setting/setting-model/modal/provider-modal/field-config/provider-config-map.ts

📝 Walkthrough

Walkthrough

This PR refactors OpenDataLoader model resolution by consolidating backend model-name selection logic to use a shared get_first_provider_model_name() helper with environment fallback in both naive.py and parser.py, and updates the frontend provider configuration to emit model_type as an array instead of a string.

Changes

OpenDataLoader Model Resolution and Config

Layer / File(s) Summary
Backend OpenDataLoader model resolution simplification
rag/app/naive.py, rag/flow/parser/parser.py
Both modules import ensure_opendataloader_from_env and replace their prior multi-step candidate-model queries with a simplified get_first_provider_model_name() call for OpenDataLoader OCR, falling back to environment configuration.
Frontend OpenDataLoader config model_type format
web/src/pages/user-setting/setting-model/modal/provider-modal/field-config/provider-config-map.ts
verifyTransform and submitTransform for OpenDataLoader provider now emit model_type as an array ['ocr'] instead of the string 'ocr'.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • infiniflow/ragflow#15860: Introduced the centralized ensure_opendataloader_from_env helper in api/db/joint_services/tenant_model_service.py that this PR now uses for OpenDataLoader model selection in naive.py and parser.py.

Suggested reviewers

  • wangq8
  • dcc123456

Poem

A Rabbit's Code Refrain 🐰

Model names now shimmer bright,
Consolidated left and right,
Config shapes shift from string to slate—
OpenDataLoader's sleek and straight!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Fix: model list' is vague and does not clearly convey the specific changes made. It lacks specificity about what model list issue is being fixed. Consider using a more descriptive title like 'Fix: Simplify OpenDataLoader model resolution' to better reflect the actual changes made across the codebase.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The PR description covers the required sections but lacks sufficient detail. The 'What problem does this PR solve?' section is vague ('Set OpenDataLoader and call in parser and naive'), and additional context about why this change is necessary would strengthen the description.
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.


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.

@Lynn-Inf Lynn-Inf added the ci Continue Integration label Jun 10, 2026
@Lynn-Inf
Lynn-Inf marked this pull request as draft June 10, 2026 08:59
@Lynn-Inf
Lynn-Inf marked this pull request as ready for review June 10, 2026 08:59
@Lynn-Inf
Lynn-Inf marked this pull request as draft June 10, 2026 09:00
@Lynn-Inf
Lynn-Inf marked this pull request as ready for review June 10, 2026 09:00
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.16%. Comparing base (3796835) to head (2dac976).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15905   +/-   ##
=======================================
  Coverage   93.16%   93.16%           
=======================================
  Files          10       10           
  Lines         717      717           
  Branches      118      118           
=======================================
  Hits          668      668           
  Misses         29       29           
  Partials       20       20           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wangq8
wangq8 merged commit 7355db1 into infiniflow:main Jun 10, 2026
1 check passed
@coderabbitai coderabbitai Bot mentioned this pull request Jun 10, 2026
1 task done
DNLALA pushed a commit to DNLALA/ragflow that referenced this pull request Sep 12, 2026
DNLALA pushed a commit to DNLALA/ragflow that referenced this pull request Sep 12, 2026
DNLALA pushed a commit to DNLALA/ragflow that referenced this pull request Sep 16, 2026
DNLALA pushed a commit to DNLALA/ragflow that referenced this pull request Sep 19, 2026
DNLALA pushed a commit to DNLALA/ragflow that referenced this pull request Sep 19, 2026
DNLALA pushed a commit to DNLALA/ragflow that referenced this pull request Sep 21, 2026
DNLALA pushed a commit to DNLALA/ragflow that referenced this pull request Sep 25, 2026
DNLALA pushed a commit to DNLALA/ragflow that referenced this pull request Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants