mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix(utils.py): support openrouter streaming
Fixes https://github.com/BerriAI/litellm/issues/5080
This commit is contained in:
parent
dc261dd07a
commit
1b6db8359a
2 changed files with 14 additions and 63 deletions
|
@ -2896,7 +2896,7 @@ def get_optional_params(
|
|||
unsupported_params = {}
|
||||
for k in non_default_params.keys():
|
||||
if k not in supported_params:
|
||||
if k == "user" or k == "stream_options":
|
||||
if k == "user" or k == "stream_options" or k == "stream":
|
||||
continue
|
||||
if k == "n" and n == 1: # langchain sends n=1 as a default value
|
||||
continue # skip this param
|
||||
|
@ -2908,8 +2908,8 @@ def get_optional_params(
|
|||
else:
|
||||
unsupported_params[k] = non_default_params[k]
|
||||
if unsupported_params:
|
||||
if litellm.drop_params == True or (
|
||||
drop_params is not None and drop_params == True
|
||||
if litellm.drop_params is True or (
|
||||
drop_params is not None and drop_params is True
|
||||
):
|
||||
pass
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue