From 85ed18e8f2e5b5e6b51be33c9e6cab2b5e323024 Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 22 Sep 2026 19:02:43 +0000 Subject: [PATCH] fix(rust_bridge): keep the Messages route on Python until the Rust path is ready (#42517) * fix(rust_bridge): keep the Messages route on Python until the Rust path is ready Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(rust_bridge): keep token counter and tokenizer routes on Python Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: ryan Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/rust_bridge/catalog.py | 6 +++--- tests/test_litellm/rust_bridge/test_catalog.py | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/litellm/rust_bridge/catalog.py b/litellm/rust_bridge/catalog.py index d7479631e04..d6cbe17d790 100644 --- a/litellm/rust_bridge/catalog.py +++ b/litellm/rust_bridge/catalog.py @@ -93,9 +93,9 @@ Rules: TypeAlias = tuple[Rule, ...] RULES: Final[Rules] = ( RouteRule(Route.OCR, Rollout.RUST_REQUIRED, providers=frozenset({"aws_textract"})), RouteRule(Route.OCR, Rollout.RUST_OPT_OUT), - RouteRule(Route.MESSAGES, Rollout.RUST_OPT_IN), - RouteRule(Route.TOKEN_COUNTER, Rollout.RUST_OPT_IN), - RouteRule(Route.TOKENIZER, Rollout.RUST_OPT_IN), + RouteRule(Route.MESSAGES, Rollout.PYTHON_ONLY), + RouteRule(Route.TOKEN_COUNTER, Rollout.PYTHON_ONLY), + RouteRule(Route.TOKENIZER, Rollout.PYTHON_ONLY), RouteRule(Route.TRANSCRIPTION, Rollout.RUST_REQUIRED, providers=frozenset({"bedrock"})), CacheRule(Rollout.PYTHON_ONLY, backends=frozenset({LiteLLMCacheType.LOCAL})), CacheRule(Rollout.PYTHON_ONLY, backends=frozenset({LiteLLMCacheType.REDIS})), diff --git a/tests/test_litellm/rust_bridge/test_catalog.py b/tests/test_litellm/rust_bridge/test_catalog.py index 82e3766e8a2..b6b486e73f0 100644 --- a/tests/test_litellm/rust_bridge/test_catalog.py +++ b/tests/test_litellm/rust_bridge/test_catalog.py @@ -53,10 +53,6 @@ def test_shipped_decisions( enabled: Final = environment == "1" if environment is not None else process is not False assert catalog.rollout(context) is Rollout.RUST_OPT_OUT assert catalog.decision(context) is (Decision.RUST_WITH_FALLBACK if enabled else Decision.PYTHON) - elif route in (Route.MESSAGES, Route.TOKEN_COUNTER, Route.TOKENIZER): - enabled: Final = environment == "1" if environment is not None else process is True - assert catalog.rollout(context) is Rollout.RUST_OPT_IN - assert catalog.decision(context) is (Decision.RUST_WITH_FALLBACK if enabled else Decision.PYTHON) elif route is Route.TRANSCRIPTION and provider == "bedrock": assert catalog.rollout(context) is Rollout.RUST_REQUIRED assert catalog.decision(context) is Decision.RUST_REQUIRED