Skip to content

Add an optional local embedding server - #822

Open
IlyaKhalafi wants to merge 1 commit into
qdrant:mainfrom
IlyaKhalafi:feat/embedding-api-server
Open

IlyaKhalafi wants to merge 1 commit into
qdrant:mainfrom
IlyaKhalafi:feat/embedding-api-server

Conversation

@IlyaKhalafi

Copy link
Copy Markdown

This PR adds fastembed serve for local text embeddings through an OpenAI-compatible endpoint. With this, clients can use a single loaded model over HTTP or load it from a local directory. Server dependencies stay optional.

Fixes #571

Tested with a real model and the OpenAI Python client, both CLI entry points and the built wheel. The 39 feature tests pass on Python 3.10, 3.12 and 3.14. The full suite passes with 236 tests passed and 13 skipped. Type checks and pre-commit checks pass.

All Submissions

  • Followed the contribution guidelines
  • Checked existing PRs for the same change

New Feature Submissions

  • Existing test suite passes
  • Added feature tests
  • Pre-commit hooks are installed and pass

@IlyaKhalafi
IlyaKhalafi requested a review from joein as a code owner October 15, 2026 13:58
@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7ed2519f-46fb-492e-bc2b-94c7640ccb1b
📥 Commits

Reviewing files that changed from the base of the PR and between de502ca and ba47103.

⛔ Files ignored due to path filters: 1
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing: 11
  • .github/workflows/python-tests.yml
  • .github/workflows/type-checkers.yml
  • .github/workflows/weekly-tests.yml
  • README.md
  • docs/embedding_server.md
  • fastembed/__main__.py
  • fastembed/cli.py
  • fastembed/server.py
  • pyproject.toml
  • tests/test_cli.py
  • tests/test_server.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

📝 Walkthrough

The change adds an optional local HTTP embedding service with health, model-list, and embeddings endpoints. The fastembed serve command configures and starts the service with Uvicorn. The API supports float or base64 embeddings and validates requests and model output. Tests cover API behavior and CLI options. Documentation describes installation, configuration, endpoints, and deployment notes.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to ba471

The local embedding service is mergeable after normal checks; no outstanding issue was established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 3.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 5 files. (6 skipped: 6… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding an optional local embedding server.
Description check Passed The description directly explains the new CLI command, OpenAI-compatible endpoint, local model support, optional dependencies, testing, and linked issue.
Linked Issues check Passed The PR implements the coding requirements in active issue #571. fastembed serve provides the requested CLI entry point and supports model selection, local model directories, device, host, port, and …
Out of Scope Changes check Passed The changes stay within issue #571. The workflow updates install the optional server dependencies for CI. The README and embedding server guide document the new service. The CLI entry point, dependenc…
Full details: Docstring Coverage

Explanation

Docstring coverage is 3.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 5 files. (6 skipped: 6 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add CLI to launch FastEmbed as an Embedding API service (OpenAI-compatible)

1 participant