Repository navigation
test(sdk-litellm): follow the router core of litellm 1.110 - #229
Merged
Merged
Conversation
LiteLLM 1.110 runs the Router in a Rust core. The core writes its own model_group_size, attempted_retries, and max_retries into the metadata of each chat call, over a proxy hook's values, and it takes stream only as a keyword. Two tests assumed the older Router and failed at the highest dependency bound. The proxy metadata test now expects the core's values when the core is present, and keeps the hook assertions for older releases. The Router stream test passes stream positionally only where the Router takes it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
python-dependency-bounds (sdks/python-litellm)job fails on every SDK PR. Its highest-versions run installs LiteLLM 1.110.2, whose Router runs in a Rust core and calls LiteLLM throughlitellm.router_attempt. Two tests assumed the older Router:model_group_size,attempted_retries, andmax_retriesinto the chat call'smetadata, over the values a proxy hook put there. The span now carries the Router's real values (1, 0, 2), not the hook'smax_retriesof 3. With the core present, the proxy metadata test expects those values. On older releases it keeps the hook assertions, which check that the scalar is exported and the dict and list stay out.streamonly as a keyword:router.acompletion(model, messages, True)raisesTypeErroron a plain Router too. The Router stream test passesstreampositionally where the Router accepts it and as a keyword otherwise, so a wrapped Router's stream is still checked on 1.110.The integration needs no change. The hook secrets leak check still runs on every version.
Tests: the package's pytest suite against LiteLLM 1.90.2 (lowest) and 1.110.2 (highest).