mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
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 <ryan@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
f3a0bb7249
commit
85ed18e8f2
2 changed files with 3 additions and 7 deletions
|
|
@ -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})),
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue