Commit graph

6 commits

Author SHA1 Message Date
Yujong Lee
c01db259d7 bring x-litellm-rust 2026-09-16 17:28:36 -07:00
Yujong Lee
c85acc8d28 test(rust_bridge): cover binding validation, async upstream errors, and OCR preparation failures
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-16 23:04:38 +00:00
Yujong Lee
62c862796a cleanup 2026-09-16 14:38:59 -07:00
Yujong Lee
f9d423827f fix(rust_bridge): let LITELLM_RUST win over litellm.rust() for optional tiers
Parse the switch with pydantic TypeAdapter(bool) so 1/true/yes/on and 0/false/no/off all work, and treat an unparseable value as unset instead of off. PYTHON_ONLY and RUST_REQUIRED still ignore both switches

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-16 19:45:11 +00:00
Yujong Lee
7a1d433e7a refactor(rust_bridge): declarative route catalog and shared runtime selection
Replace the per-route enablement helpers (rust_enabled, rust_ocr_enabled, RUST_CHAT_COMPLETIONS_PROVIDERS, FallbackMode) with a single rule table in litellm/rust_bridge/catalog.py that maps a Context(route, provider, model, delivery) to one of four rollout tiers, and a pure decide() that turns tier plus process/env switches into a Decision. runtime.run/arun own the only fallback path: Python for PYTHON, native then Python on missing binding or admission decline for RUST_WITH_FALLBACK, raise for RUST_REQUIRED. OCR is the first route on the shared runtime; chat completions, Anthropic messages, and Responses websocket policy checks now read the catalog.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-16 19:10:42 +00:00
yujonglee
082bea851e
Merge pull request #39334 from BerriAI/litellm_rust_opt_in_configuration
feat(python): unify Rust opt-in and bridge policy
2026-09-02 16:26:36 -07:00