Skip to content

Bug fix: Enhance embeding model to give better error message - #15346

Merged
wangq8 merged 15 commits into
infiniflow:mainfrom
wangq8:bugfix/fix-embeding-model-not-response
Jun 1, 2026
Merged

wangq8 merged 15 commits into
infiniflow:mainfrom
wangq8:bugfix/fix-embeding-model-not-response

Conversation

@wangq8

@wangq8 wangq8 commented May 28, 2026 •

Copy link
Copy Markdown
Collaborator

To resolve #15343 enhance the model embedding message to give extact failure message to customer.

QWen

Retrieval

image

Chat

image

SiliconFlow

Retrieval

image

Chat

image

Baichuan

Retrieval

image

Chat

image

Zhipu

zhipu is good.

@coderabbitai

coderabbitai Bot commented May 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds ModelException and an app error handler; centralizes embedding HTTP-status handling and bounded retries across providers; adds a Docker admin launch script with retries and cleanup; fixes CI readiness log denominator messages; refactors PerplexityEmbed tests to use a shared mock helper.

Changes

Error Handling Infrastructure Refactor

Layer / File(s) Summary
ModelException definition and app error handler
common/exceptions.py, api/apps/__init__.py
ModelException class added; app registers @app.errorhandler(ModelException) that logs and returns get_json_result(...) with RetCode.BAD_REQUEST (HTTP 200).
API error-path tweaks
api/utils/api_utils.py, api/apps/restful_apis/dataset_api.py
server_error_response added early "not_found" detection returning get_error_data_result(...); search_datasets now branches on (success, result) and no longer wraps the service call in try/except.
Embedding HTTP error helper and imports
rag/llm/embedding_model.py
Adds _raise_model_exception_if_failed(resp) and imports ModelException.
OpenAI embedding exception wrapping
rag/llm/embedding_model.py
OpenAI encode/encode_queries now catch client exceptions and re-raise ModelException.
QWen provider: status-code-driven retry
rag/llm/embedding_model.py
QWen encode/encode_queries switched to a bounded status-code-driven retry loop; immediate ModelException on fatal 4XX and ModelException after retry exhaustion.
Other embedding providers error handling
rag/llm/embedding_model.py
JinaMultiVec, Nvidia, SILICONFLOW, HuggingFace, and Perplexity now validate responses with _raise_model_exception_if_failed before parsing JSON.

Admin Service Launch Script

Layer / File(s) Summary
Environment loading and runtime path configuration
docker/launch_admin_service.sh
Adds load_env_file() to source optional .env, unsets HTTP proxy env vars, and configures PYTHONPATH, LD_LIBRARY_PATH, JEMALLOC_PATH, and NLTK_DATA.
Cleanup handler and signal trapping
docker/launch_admin_service.sh
Adds cleanup() to set shutdown flag and kill tracked child PIDs; registers trap handlers for SIGINT/SIGTERM.
Server startup with bounded retry and background wait
docker/launch_admin_service.sh
Implements run_server() that starts admin/server/admin_server.py with a retry loop up to MAX_RETRIES, sleeps between attempts, background-executes and records PID, and waits for completion.

Workflow Service Readiness Logging Fixes

Layer / File(s) Summary
Service readiness timeout logging scale corrections
.github/workflows/tests.yml
Six test steps (Infinity SDK/REST/CLI and Elasticsearch SDK/REST/CLI) update readiness loop log denominator from ($i/120) to ($i/60).

PerplexityEmbed Tests

Layer / File(s) Summary
Test helper consolidation and mocks
test/unit_test/rag/llm/test_perplexity_embed.py
Adds _mock_http_response(...) helper and refactors multiple encode/contextualized tests to use it; preserves API-error simulation via json.side_effect.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested reviewers

  • Haruko386

🐰 I hopped through code with nimble feet,
Model errors tamed, retries kept neat,
Embeddings now signal clearly and bright,
Docker restarts through the dark night,
CI logs corrected—huzzah, what a treat!

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The changes in .github/workflows/tests.yml (log message denominator fix) and docker/launch_admin_service.sh (new entrypoint script) appear unrelated to the primary objective of enhancing embedding model error messages. Remove or address changes to tests.yml and launch_admin_service.sh as they are outside the scope of improving embedding model error handling.
Docstring Coverage ⚠️ Warning Docstring coverage is 20.59% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The PR description includes a reference to the linked issue (#15343) and demonstrates the enhanced error messages with visual examples, but lacks the formal template structure with explicit 'What problem does this PR solve' and 'Type of change' sections. Fill in the pull request description template with explicit sections: 'What problem does this PR solve?' and 'Type of change' with checkbox selection for Bug Fix.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Bug fix: Enhance embeding model to give better error message' directly relates to the main change: improving error handling and messages in embedding models for better customer visibility.
Linked Issues check ✅ Passed The changes implement the objective from issue #15343 by adding a ModelException class, enhancing HTTP error handling in embedding models, and updating error responses to provide clear, actionable failure messages instead of opaque exceptions.

✏️ 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.

@wangq8 wangq8 added ci Continue Integration 🐞 bug Something isn't working, pull request that fix bug. labels May 28, 2026
@wangq8 wangq8 changed the title Bug fix: ERROR: 'NoneType' object is not subscriptable Bug fix: Enhance embeding model to give better error message Jun 1, 2026
@wangq8
wangq8 marked this pull request as ready for review June 1, 2026 08:08
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 1, 2026
Comment thread docker/launch_admin_service.sh Resolved
Comment thread .github/workflows/tests.yml Resolved
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 1, 2026

@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.

Actionable comments posted: 7

🤖 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.

Inline comments:
In `@api/apps/__init__.py`:
- Around line 365-368: The handler for ModelException in handle_model_exception
currently returns repr(error) which exposes the exception class wrapper; change
the returned message to the underlying error text (use str(error) or error.msg
if ModelException defines msg) so the API response contains the provider error
message. Update the return in handle_model_exception to call
get_json_result(..., message=str(error)) (or message=error.msg) and keep the
same status/structure.

In `@api/apps/restful_apis/dataset_api.py`:
- Around line 500-504: The dataset-scoped search route currently swallows
provider/ModelException by catching broad exceptions; change its handler (the
/datasets/<dataset_id>/search function that calls
dataset_api_service.search_datasets for a dataset) to use the same flow as the
tenant-level route: call dataset_api_service.search_datasets(...) and then if
success return get_result(data=result) else return
get_error_data_result(message=result), and remove the broad try/except that
catches Exception (or ensure it re-raises ModelException) so ModelException can
propagate to the global handler.

In `@api/utils/api_utils.py`:
- Around line 147-148: The "not_found" branch in api_utils.py is catching errors
before the more specific "index_not_found_exception" case, changing the intended
response; update the exception-ordering so you check for the specific
index-missing case (e.g., look for "index_not_found_exception" in str(e) or use
the existing index-checking condition) before the generic if "not_found" in
str(e) branch, and ensure the index-missing path returns the original specific
message via get_error_data_result while the generic "not_found" branch remains
as a fallback.

In `@common/exceptions.py`:
- Around line 30-33: ModelException currently assigns self.msg and
self.retryable but never initializes the base Exception, causing Exception.args
to be empty and server_error_response to show ModelException() instead of the
message; update ModelException.__init__ to call super().__init__(msg) (and keep
self.retryable) so the message is preserved in Exception.args and repr/str(e)
will include the provider message (or alternatively implement __str__ to return
self.msg if you prefer).

In `@docker/launch_admin_service.sh`:
- Around line 54-63: cleanup() currently only kills wrapper PIDs stored in PIDS
but not the actual admin_server.py process started inside run_server, so the
Python server can be left running; fix by either modifying run_server to capture
the child PID of admin/server/admin_server.py and append that PID to PIDS (e.g.,
launch the Python server in background inside run_server and export/echo its PID
so the outer script can add it to PIDS) or make run_server start its processes
in a new process group (setsid or set -m) and then have cleanup() kill the
entire group (kill -TERM -PGID) instead of only the wrapper PID; ensure you
update run_server, the code that adds to PIDS, and cleanup() to handle the real
admin_server.py PID or PGID.
- Around line 73-76: The retry logic fails under set -e because a non-zero exit
from "$PY admin/server/admin_server.py" causes the script to exit before
EXIT_CODE is captured and retry logic in the loop can run; wrap the call so the
exit is captured without aborting (for example temporarily disable errexit
around the invocation or append "|| true" and then set EXIT_CODE=$?), using the
existing variables ($PY, admin/server/admin_server.py, EXIT_CODE, retry_count,
MAX_RETRIES, STOP) and keep the loop semantics. Also ensure cleanup() actually
stops the real admin_server.py child: when run_server backgrounds the wrapper,
record and kill the actual child PID (or start admin_server.py in its own
process group and kill the group) instead of only killing the wrapper PID;
update run_server and cleanup() to track and kill the child process or process
group so admin_server.py is not orphaned.

In `@rag/llm/embedding_model.py`:
- Around line 313-327: The retry loop in the DashScope embedding call
incorrectly uses "if retry < retry_max" which is always true because retry
iterates from range(retry_max); update the exhaustion logic in the method
containing this loop (the block using variables retry_max, retry_wait_secs, and
calling dashscope.TextEmbedding.call with self.model_name/self.key) so that you
either check "if retry < retry_max - 1" before sleeping and retrying, or move
the final ModelException to run after the for-loop if no successful 200 response
is received; ensure 4XX non-retryable errors still raise immediately and that
the final raise includes status_code and resp.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e235bf02-d67c-42d8-930f-f0ba792d3c0d

📥 Commits

Reviewing files that changed from the base of the PR and between 82202fa and cdd9ba1.

📒 Files selected for processing (7)
  • .github/workflows/tests.yml
  • api/apps/__init__.py
  • api/apps/restful_apis/dataset_api.py
  • api/utils/api_utils.py
  • common/exceptions.py
  • docker/launch_admin_service.sh
  • rag/llm/embedding_model.py

Comment thread api/apps/__init__.py Resolved
Comment on lines +500 to +504
success, result = await dataset_api_service.search_datasets(tenant_id, req)
if success:
return get_result(data=result)
else:
return get_error_data_result(message=result)

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Apply the same exception flow to the dataset-scoped search route.

/datasets/search now lets ModelException reach the global handler, but the sibling /datasets/<dataset_id>/search route still catches broad exceptions and collapses provider failures into "Internal server error". That leaves the dataset-level retrieval test path without the improved model message this PR is targeting.

🤖 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 `@api/apps/restful_apis/dataset_api.py` around lines 500 - 504, The
dataset-scoped search route currently swallows provider/ModelException by
catching broad exceptions; change its handler (the /datasets/<dataset_id>/search
function that calls dataset_api_service.search_datasets for a dataset) to use
the same flow as the tenant-level route: call
dataset_api_service.search_datasets(...) and then if success return
get_result(data=result) else return get_error_data_result(message=result), and
remove the broad try/except that catches Exception (or ensure it re-raises
ModelException) so ModelException can propagate to the global handler.

Comment thread api/utils/api_utils.py Resolved
Comment thread common/exceptions.py Resolved
Comment on lines +54 to +63
cleanup() {
echo "Termination signal received. Shutting down..."
STOP=true
# Terminate all child processes
for pid in "${PIDS[@]}"; do
if kill -0 "$pid" 2>/dev/null; then
echo "Killing process $pid"
kill "$pid"
fi
done

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify only wrapper PID is tracked and no dedicated admin_server PID is managed.
rg -n -C3 'PIDS|run_server &|cleanup\(\)|kill ' docker/launch_admin_service.sh

Repository: infiniflow/ragflow

Length of output: 682


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show run_server implementation and where admin_server.py is launched
nl -ba docker/launch_admin_service.sh | sed -n '40,120p'

# Confirm all occurrences of admin_server.py and how it's started
rg -n 'admin/server/admin_server\.py' docker/launch_admin_service.sh || true

Repository: infiniflow/ragflow

Length of output: 105


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the relevant portion of the script with line numbers (using cat -n instead of nl)
cat -n docker/launch_admin_service.sh | sed -n '35,140p'

# Find how admin_server.py is started
rg -n 'admin/server/admin_server\.py' docker/launch_admin_service.sh || true

# Find how PIDS is used
rg -n 'PIDS|\bcleanup\(\)|kill ' docker/launch_admin_service.sh

Repository: infiniflow/ragflow

Length of output: 2248


Shutdown may not reliably terminate admin_server.py

docker/launch_admin_service.sh starts run_server in the background and stores only that wrapper PID in PIDS (run_server & / PIDS+=($!)). cleanup() then kills only the PIDs in PIDS, but admin/server/admin_server.py is launched in the foreground inside the run_server subshell—so SIGTERM handling can leave the Python server running/orphaned.

Update shutdown to track and kill the actual admin_server.py PID (or kill its process group) from cleanup() instead of only killing the wrapper PID.

🤖 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 `@docker/launch_admin_service.sh` around lines 54 - 63, cleanup() currently
only kills wrapper PIDs stored in PIDS but not the actual admin_server.py
process started inside run_server, so the Python server can be left running; fix
by either modifying run_server to capture the child PID of
admin/server/admin_server.py and append that PID to PIDS (e.g., launch the
Python server in background inside run_server and export/echo its PID so the
outer script can add it to PIDS) or make run_server start its processes in a new
process group (setsid or set -m) and then have cleanup() kill the entire group
(kill -TERM -PGID) instead of only the wrapper PID; ensure you update
run_server, the code that adds to PIDS, and cleanup() to handle the real
admin_server.py PID or PGID.

Comment on lines +73 to +76
while ! $STOP && [ $retry_count -lt $MAX_RETRIES ]; do
echo "Starting admin_server.py (Attempt $((retry_count+1)))"
$PY admin/server/admin_server.py
EXIT_CODE=$?

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify retry flow is vulnerable to errexit short-circuiting.
rg -n -C2 'set -e|run_server\(\)|admin/server/admin_server.py|EXIT_CODE=\$\?' docker/launch_admin_service.sh

Repository: infiniflow/ragflow

Length of output: 606


🏁 Script executed:

#!/bin/bash
set -euo pipefail
nl -ba docker/launch_admin_service.sh | sed -n '1,140p'

Repository: infiniflow/ragflow

Length of output: 105


🏁 Script executed:

#!/bin/bash
awk '{printf "%4d:%s\n", NR, $0}' docker/launch_admin_service.sh | sed -n '1,180p'

Repository: infiniflow/ragflow

Length of output: 3097


Fix retry logic under set -e (and improve shutdown to avoid orphaning admin_server.py)

  • set -e at line 4 prevents the retry path from running: if $PY admin/server/admin_server.py (line 75) exits non-zero, the script exits immediately before EXIT_CODE=$? (line 76) and the retry branch (lines 77-84) can execute.
  • Shutdown may not stop the actual server: run_server is backgrounded (line 94) and cleanup() only kills that wrapper PID (lines 58-62), not the admin_server.py child it spawned.
Suggested fix (retry logic)
 run_server(){
     local retry_count=0
     while ! $STOP && [ $retry_count -lt $MAX_RETRIES ]; do
         echo "Starting admin_server.py (Attempt $((retry_count+1)))"
-        $PY admin/server/admin_server.py
-        EXIT_CODE=$?
+        if $PY admin/server/admin_server.py; then
+            EXIT_CODE=0
+        else
+            EXIT_CODE=$?
+        fi
         if [ $EXIT_CODE -eq 0 ]; then
             echo "admin_server.py exited successfully."
             break
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
while ! $STOP && [ $retry_count -lt $MAX_RETRIES ]; do
echo "Starting admin_server.py (Attempt $((retry_count+1)))"
$PY admin/server/admin_server.py
EXIT_CODE=$?
while ! $STOP && [ $retry_count -lt $MAX_RETRIES ]; do
echo "Starting admin_server.py (Attempt $((retry_count+1)))"
if $PY admin/server/admin_server.py; then
EXIT_CODE=0
else
EXIT_CODE=$?
fi
🤖 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 `@docker/launch_admin_service.sh` around lines 73 - 76, The retry logic fails
under set -e because a non-zero exit from "$PY admin/server/admin_server.py"
causes the script to exit before EXIT_CODE is captured and retry logic in the
loop can run; wrap the call so the exit is captured without aborting (for
example temporarily disable errexit around the invocation or append "|| true"
and then set EXIT_CODE=$?), using the existing variables ($PY,
admin/server/admin_server.py, EXIT_CODE, retry_count, MAX_RETRIES, STOP) and
keep the loop semantics. Also ensure cleanup() actually stops the real
admin_server.py child: when run_server backgrounds the wrapper, record and kill
the actual child PID (or start admin_server.py in its own process group and kill
the group) instead of only killing the wrapper PID; update run_server and
cleanup() to track and kill the child process or process group so
admin_server.py is not orphaned.

Comment thread rag/llm/embedding_model.py Resolved

@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)
api/utils/api_utils.py (1)

150-152: ⚡ Quick win

Add logging for the new not_found error flow.

This new error-handling path should include a logging statement before returning the error response, as per coding guidelines: "Add logging for new flows".

📝 Suggested addition
 if "not_found" in str(e):
+    logging.warning(f"Chunk not found: {e}")
     return get_error_data_result(message="No chunk found! Check the chunk status please!")

As per coding guidelines, new flows in **/*.py should add logging.

🤖 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 `@api/utils/api_utils.py` around lines 150 - 152, The new "not_found" error
branch in api_utils.py should log the error before returning—add a logging call
(e.g., logger.error or logging.getLogger(__name__).error) right before the
return in the if "not_found" in str(e) block, include the exception details (e)
and a clear message such as "No chunk found" to aid debugging, and ensure the
module has a logger available (import logging or use the existing module-level
logger) so get_error_data_result is returned after the log.
🤖 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 `@api/utils/api_utils.py`:
- Around line 150-152: The new "not_found" error branch in api_utils.py should
log the error before returning—add a logging call (e.g., logger.error or
logging.getLogger(__name__).error) right before the return in the if "not_found"
in str(e) block, include the exception details (e) and a clear message such as
"No chunk found" to aid debugging, and ensure the module has a logger available
(import logging or use the existing module-level logger) so
get_error_data_result is returned after the log.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 05f1fc5c-7016-4506-b9a1-6c283b26485c

📥 Commits

Reviewing files that changed from the base of the PR and between cdd9ba1 and 48b343c.

📒 Files selected for processing (3)
  • api/utils/api_utils.py
  • common/exceptions.py
  • rag/llm/embedding_model.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • common/exceptions.py
  • rag/llm/embedding_model.py

@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)
test/unit_test/rag/llm/test_perplexity_embed.py (1)

136-239: ⚡ Quick win

Add pytest priority markers to the updated tests.

The refactored tests are still unmarked. Please add @pytest.mark.p1/p2/p3 (class-level is fine) so these cases participate correctly in priority-based test selection.

Proposed change
 class TestPerplexityEmbedStandardEncode:
+    pytestmark = pytest.mark.p2
     `@patch`("rag.llm.embedding_model.requests.post")
     def test_encode_single_text(self, mock_post):
         ...
 
 class TestPerplexityEmbedContextualizedEncode:
+    pytestmark = pytest.mark.p2
     `@patch`("rag.llm.embedding_model.requests.post")
     def test_contextualized_encode(self, mock_post):
         ...
 
 class TestPerplexityEmbedEncodeQueries:
+    pytestmark = pytest.mark.p2
     `@patch`("rag.llm.embedding_model.requests.post")
     def test_encode_queries_returns_single_vector(self, mock_post):
         ...

As per coding guidelines, test/**/*.py: Use pytest with priority markers (p1/p2/p3) for Python backend tests.

🤖 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 `@test/unit_test/rag/llm/test_perplexity_embed.py` around lines 136 - 239, The
tests lack pytest priority markers; add appropriate decorators (e.g.,
`@pytest.mark.p1` or p2/p3 as required) at the class level for
TestPerplexityEmbed, TestPerplexityEmbedContextualizedEncode, and
TestPerplexityEmbedEncodeQueries so they participate in priority-based
selection, and ensure pytest is imported at the top of the file; place the
marker directly above each class definition (or on individual test methods if
class-level is not desired).
🤖 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 `@test/unit_test/rag/llm/test_perplexity_embed.py`:
- Around line 136-239: The tests lack pytest priority markers; add appropriate
decorators (e.g., `@pytest.mark.p1` or p2/p3 as required) at the class level for
TestPerplexityEmbed, TestPerplexityEmbedContextualizedEncode, and
TestPerplexityEmbedEncodeQueries so they participate in priority-based
selection, and ensure pytest is imported at the top of the file; place the
marker directly above each class definition (or on individual test methods if
class-level is not desired).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 74e8d4a2-5a9e-429f-89ca-674aa622d20a

📥 Commits

Reviewing files that changed from the base of the PR and between 48b343c and 408a4a8.

📒 Files selected for processing (1)
  • test/unit_test/rag/llm/test_perplexity_embed.py

@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.16%. Comparing base (12579db) to head (408a4a8).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15346   +/-   ##
=======================================
  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 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 1a6df01 into infiniflow:main Jun 1, 2026
1 check passed
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 lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ERROR: 'NoneType' object is not subscriptable

2 participants