Skip to content

Fix: display error - #14654

Merged
wangq8 merged 2 commits into
infiniflow:mainfrom
Lynn-Inf:fix/llm-error
May 8, 2026
Merged

wangq8 merged 2 commits into
infiniflow:mainfrom
Lynn-Inf:fix/llm-error

Conversation

@Lynn-Inf

@Lynn-Inf Lynn-Inf commented May 8, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Use right key in error text.

Type of change

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

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 8, 2026
@coderabbitai

coderabbitai Bot commented May 8, 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: cf75930c-fd2a-4f4a-b34a-b9d4a314a6fd

📥 Commits

Reviewing files that changed from the base of the PR and between 5d28bb0 and a21c65d.

📒 Files selected for processing (1)
  • api/db/services/tenant_llm_service.py

📝 Walkthrough

Walkthrough

The PR corrects a single configuration key reference in an LLM model validation error message. When TenantLLMService.model_instance() fails to produce a model, the assertion now correctly references the actual config schema key model_type instead of a non-existent llm_type key.

Changes

LLM Configuration Key Reference

Layer / File(s) Summary
Error Message Configuration Reference
api/db/services/tenant_llm_service.py
The assertion error message in LLM4Tenant.__init__ now correctly references model_config["model_type"] instead of model_config["llm_type"] to match the actual config schema.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A config key was lost in the mist,
llm_type didn't exist!
But model_type came to the rescue,
Now validation will surely confess true,
One line fixed, the rabbit persists! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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: display error' is too vague and generic; it does not convey the specific nature of the bug being fixed (referencing the correct model_config key). Revise the title to be more specific, such as 'Fix: use correct model_config key in LLM error message' to clearly indicate what is being fixed.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description includes the required template sections with the problem statement and type of change clearly marked, though the problem statement could be more detailed.
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 🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration labels May 8, 2026
@Lynn-Inf
Lynn-Inf marked this pull request as draft May 8, 2026 02:56
@Lynn-Inf
Lynn-Inf marked this pull request as ready for review May 8, 2026 02:56
@codecov

codecov Bot commented May 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.16%. Comparing base (59c3510) to head (a21c65d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14654      +/-   ##
==========================================
- Coverage   95.59%   94.16%   -1.43%     
==========================================
  Files          10       10              
  Lines         703      703              
  Branches      112      112              
==========================================
- Hits          672      662      -10     
- Misses         21       25       +4     
- Partials       10       16       +6     

☔ View full report in Codecov by Sentry.
📢 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 412fae7 into infiniflow:main May 8, 2026
2 checks passed
pekar9781 pushed a commit to pekar9781/ragflow that referenced this pull request May 8, 2026
### What problem does this PR solve?

Use right key in error text.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
Ricardo-M-L pushed a commit to Ricardo-M-L/ragflow that referenced this pull request Aug 17, 2026
### What problem does this PR solve?

Use right key in error text.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
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:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants