Skip to content

feat(embeddings): add native dispatch foundation - #42799

Merged
yujonglee-berri merged 4 commits into
mainfrom
litellm_embeddings_native_dispatch
Sep 23, 2026
Merged

yujonglee-berri merged 4 commits into
mainfrom
litellm_embeddings_native_dispatch

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Embeddings have no native dispatch boundary
  • Future native routing cannot preserve the public API yet

How it solves it:

  • Adds sync and async embedding dispatch entrypoints
  • Projects public arguments into a typed native request
  • Keeps embeddings on the Python rollout by default

User Flow

Before: a developer sends an embeddings request through the gateway, which only has the legacy execution path

  1. They send POST https://litellm-domain/embeddings with a model and input
  2. The gateway returns the normal embedding response with HTTP 200

After: the same request keeps its existing response while the gateway has a native dispatch boundary ready for future route implementations

  1. They send POST https://litellm-domain/embeddings with the same model and input
  2. The gateway returns the same embedding response with HTTP 200

Relevant issues

Affected release

Linear ticket

Pre-Submission checklist

  • I have added meaningful tests
  • The handful of test files covering my change pass locally
  • My PR passes all required CI/CD checks
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review

Screenshots / Proof of Fix

The change is a dispatch foundation with the embeddings route intentionally remaining Python-only, so there is no user-visible behavior change to demonstrate with a live provider call. Focused Python tests pass, and the Rust bridge test suite passes with the Python shared library path configured

Type

New Feature

Caveats (if any)

Low

  • Native embeddings execution is not implemented in this foundation
  • The default rollout remains Python-only

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

Link to Devin session: https://app.devin.ai/sessions/73d071e967a5467d991e7f7f5ed997a1
Open in Devin Desktop: https://app.devin.ai/desktop/session/73d071e967a5467d991e7f7f5ed997a1?variant=devin
Requested by: @yujonglee-berri

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@greptile-apps

greptile-apps Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge because embeddings remain on the existing Python execution path and native declines are handled by the dispatch runtime

Summary

This PR adds the native embeddings dispatch boundary while retaining the existing Python implementation by default

  • Adds typed sync and async embedding dispatch wrappers
  • Registers native bridge entrypoints that decline until provider execution is implemented
  • Adds embeddings rollout catalog support and focused dispatch tests

Reviews (1) · Last reviewed commit: "feat(embeddings): add native dispatch fo..."

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@codecov

codecov Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.69231% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
litellm/rust_bridge/embeddings/entrypoints.py 76.92% 6 Missing ⚠️
litellm/embeddings/dispatch.py 94.59% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@yujonglee-berri
yujonglee-berri enabled auto-merge (squash) September 23, 2026 20:56
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@yujonglee-berri
yujonglee-berri merged commit 2b3a7f7 into main Sep 23, 2026
96 of 97 checks passed
@yujonglee-berri
yujonglee-berri deleted the litellm_embeddings_native_dispatch branch September 23, 2026 21:11
@codspeed

codspeed Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_embeddings_native_dispatch (ec815a9) with main (02d1e2c)

Open in CodSpeed

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.

1 participant