litellm/litellm-rust/crates/python-bridge
devin-ai-integration[bot] 170eb7fb95
feat(rust-bridge): extend native dispatch foundation to chat completions, responses, and messages (#42805)
* feat(rust-bridge): declare native chat completions and responses bindings

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

* test(dispatch): cover chat completions and messages dispatch

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

* refactor(rust-bridge): keep secret manager stub formatting unchanged

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

* fix(rust-bridge): match stub parameter names and exports to the native surface

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

* fix(rust-bridge): name declining entrypoint parameters and export embeddings in the stub

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

* test(rust-bridge): cover embeddings bindings in the route matrix

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

* refactor(rust-bridge): keep secret manager stub formatting unchanged

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

---------

Co-authored-by: Yujong Lee <yujong@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-23 21:47:27 +00:00
..
benches refactor(rust): add types and core-utils crates, unify the provider error 2026-09-17 22:01:14 -07:00
src feat(rust-bridge): extend native dispatch foundation to chat completions, responses, and messages (#42805) 2026-09-23 21:47:27 +00:00
tests refactor(rust): add types and core-utils crates, unify the provider error 2026-09-17 22:01:14 -07:00
AGENTS.md refactor(rust): rename legacy callback adapter crate 2026-09-19 23:06:26 +00:00
build.rs feat: package Rust OCR bridge in LiteLLM wheel (#31267) 2026-06-25 12:32:55 -07:00
Cargo.toml feat(secrets): route secret resolution through native Rust backends (#42619) 2026-09-23 08:24:57 -07:00
README.md feat(secrets): route secret resolution through native Rust backends (#42619) 2026-09-23 08:24:57 -07:00

Native OCR uses litellm_secrets::source::SecretSource. Built-in secret managers resolve to retained Rust backends. Custom Python managers and overrides keep the callback path. Readable managers still require the Rust secret-manager binding to be enabled

The shared proxy initializer captures native configuration without loading the extension or doing native I/O. _SecretManagerRuntime.from_client constructs a backend on first use and keeps its handle on the Python client. The secret-manager dispatcher selects Python or Rust through catalog.py. Native reads call that handle; Rust routes extract the backend directly. Configuration changes replace the handle, while calls already bound to the previous backend keep using it. Handles cannot be reused after fork. Directly constructed LiteLLM managers are adapted on first native use. Manually supplied SDK clients keep their Python behavior because their credentials cannot be inferred safely. Provider implementations contain no bridge registration

Retention describes ownership and lifetime. callbacks-legacy-python::PublicCall owns Python references for one call to preserve identity. A native cache or secret-manager handle owns shared Rust state across calls to preserve connection pools and caches. Both use existing Py<T> and shared Rust ownership, with execution and GIL transitions handled by litellm-host-python

Cache and secret-manager catalog entries remain Python-only, including when LITELLM_RUST=1. This wiring does not change rollout policy

OCR provider requests use the shared litellm-http pool. AWS and Google secret-manager SDK clients keep their SDK transports, which do not yet inherit the pool's proxy, TLS, certificate, timeout, or observability configuration. Preserve those SDK transports and configure them equivalently instead of forcing them through reqwest