Repository navigation
docs: document the tenant_id parameter in resume parsing - #18169
Conversation
Three functions in rag/app/resume.py document every parameter except tenant_id, which is the one that selects the tenant's chat model: - _call_llm builds LLMBundle(tenant_id, LLMType.CHAT, ...) - parse_with_llm forwards it to all four extraction subtasks - parse_resume forwards it to parse_with_llm Docstrings only; no behavior change. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe change adds ChangesResume tenant documentation
Estimated code review effort: 1 (Trivial) | ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #18169 +/- ##
=======================================
Coverage 90.65% 90.65%
=======================================
Files 10 10
Lines 717 717
Branches 118 118
=======================================
Hits 650 650
Misses 39 39
Partials 28 28 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Second ragflow PR (#17639 merged 2026-07-31). Docstrings only, no behavior change.
What's wrong
Three functions in
rag/app/resume.pydocument every parameter excepttenant_id— andtenant_idis the one that decides which tenant's chat model serves the request, so it is the leastguessable of the set:
tenant_idactually does there_call_llm(:1037)prompt,langtenant_id:1057LLMBundle(tenant_id, LLMType.CHAT, lang=lang)— it selects the modelparse_with_llm(:1285)indexed_text,lines,langtenant_id:1305-1308forwards it to all four parallel extraction subtasksparse_resume(:2062)filename,binary,langtenant_id:2078forwards it toparse_with_llmEach docstring is otherwise complete, so the omission reads as an oversight from when
tenant_idwas threaded through, not as a deliberate style choice.
I traced each one to the line that uses the value rather than paraphrasing the parameter name —
that is where "selects the tenant's chat model" comes from (
_call_llm→LLMBundle(..., LLMType.CHAT)),not from the name looking like a tenant id.
Deliberately not touched
chunk()(:2479) also takestenant_idand its Args section does not list it separately — butthat one is intentional and I left it alone. Its
**kwargsentry reads:so the author folded
tenant_idinto the kwargs description. My scanner flagged it; reading thedocstring showed the flag was wrong. Changing it would be a style argument, not a defect fix.
Validation
Ruff output is byte-identical before and after the change (verified by stashing the diff and
re-running), so nothing here introduces a lint finding. The one >200-char line in this file
(
:1980) is pre-existing and untouched.git diff --stat:rag/app/resume.py | 3 +++— three added lines, no deletions.🤖 Written with Claude Code. Each site was opened and read, and
each description was checked against the line that consumes the value.