Skip to content

test(sdk-litellm): follow the router core of litellm 1.110 - #229

Merged
aikins01 merged 1 commit into
mainfrom
test/sdk-litellm/router-core
Nov 21, 2026
Merged

aikins01 merged 1 commit into
mainfrom
test/sdk-litellm/router-core

Conversation

@aikins01

Copy link
Copy Markdown
Contributor

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 through litellm.router_attempt. Two tests assumed the older Router:

  • The core writes its own model_group_size, attempted_retries, and max_retries into the chat call's metadata, over the values a proxy hook put there. The span now carries the Router's real values (1, 0, 2), not the hook's max_retries of 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.
  • The core takes stream only as a keyword: router.acompletion(model, messages, True) raises TypeError on a plain Router too. The Router stream test passes stream positionally 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).

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.
@aikins01 aikins01 self-assigned this Nov 20, 2026
@aikins01
aikins01 merged commit 7b5a652 into main Nov 21, 2026
10 checks passed
@aikins01
aikins01 deleted the test/sdk-litellm/router-core branch November 21, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant