mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-12 08:42:18 +00:00
fix(messages): drop stream_timeout once native folds it into timeout so streams stay on Rust
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
473e1a442e
commit
487242006a
2 changed files with 5 additions and 2 deletions
|
|
@ -58,7 +58,7 @@ def _native_kwargs(fields: Mapping[str, object], kwargs: Mapping[str, object]) -
|
|||
stream_timeout: Final = kwargs.get("stream_timeout")
|
||||
if fields.get("stream") is not True or stream_timeout is None:
|
||||
return kwargs
|
||||
return {**kwargs, "timeout": stream_timeout}
|
||||
return {**{key: value for key, value in kwargs.items() if key != "stream_timeout"}, "timeout": stream_timeout}
|
||||
|
||||
|
||||
def _public_request(
|
||||
|
|
|
|||
|
|
@ -189,7 +189,10 @@ def test_native_streams_are_bounded_by_stream_timeout(stream: bool, expected_tim
|
|||
python=python,
|
||||
binding=messages_binding(native),
|
||||
native=lambda hook, request, call_args, call_kwargs: hook(request),
|
||||
rules=RUST_RULES,
|
||||
rules=(
|
||||
RouteRule(Route.MESSAGES, Rollout.PYTHON_ONLY, features=MESSAGES_PYTHON_FEATURES),
|
||||
RouteRule(Route.MESSAGES, Rollout.RUST_REQUIRED),
|
||||
),
|
||||
)
|
||||
assert captured[0].resolved["timeout"] == expected_timeout
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue