Skip to content

fix: await lmstudio embedding verification - #15772

Merged
wangq8 merged 1 commit into
infiniflow:mainfrom
buua436:b069
Jun 8, 2026
Merged

wangq8 merged 1 commit into
infiniflow:mainfrom
buua436:b069

Conversation

@buua436

@buua436 buua436 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Fix LM-Studio provider connection verification so embedding checks await the async wrapper correctly and log the full traceback on failures.

Type of change

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

@coderabbitai

coderabbitai Bot commented Jun 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: 15db16d4-8fac-4f0d-91d2-7814567232aa

📥 Commits

Reviewing files that changed from the base of the PR and between 14c460a and 24a3236.

📒 Files selected for processing (1)
  • api/apps/services/provider_api_service.py

📝 Walkthrough

Walkthrough

The PR enhances error diagnostics in the verify_api_key method by adding structured exception logging across three model verification branches. Exception handlers for embedding, chat, and rerank model API-key checks now emit full exception tracebacks via logging.exception() alongside existing error messages, improving visibility into API validation failures.

Changes

API Key Verification Error Logging

Layer / File(s) Summary
Exception logging in model verification branches
api/apps/services/provider_api_service.py
Embedding, chat, and rerank model API-key verification handlers now call logging.exception() to record full exception tracebacks including provider and model names. The embedding handler's asyncio.wait_for() call is also reformatted.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Three branches sing the same refrain,
Exceptions logged with clear domain,
No secrets hidden when things fail—
Each model type now tells its tale! 📝

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly addresses the main change: fixing the await behavior for LM-Studio embedding verification, which aligns with the code modification and PR objectives.
Description check ✅ Passed The description includes both required template sections: a clear problem statement explaining the fix and the bug fix type classification, fully meeting the template requirements.
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.


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.

@buua436 buua436 added the ci Continue Integration label Jun 8, 2026
@buua436
buua436 marked this pull request as ready for review June 8, 2026 09:25
@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 8, 2026
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.16%. Comparing base (e81bca7) to head (24a3236).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15772   +/-   ##
=======================================
  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 0c5245e into infiniflow:main Jun 8, 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 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