forked from phoenix/litellm-mirror
fix(proxy_server.py) Check when '_hidden_params' is None
This commit is contained in:
parent
940569703e
commit
c39c8f70eb
1 changed files with 4 additions and 1 deletions
|
@ -1284,7 +1284,10 @@ async def chat_completion(
|
|||
else: # router is not set
|
||||
response = await litellm.acompletion(**data)
|
||||
|
||||
model_id = response._hidden_params.get("model_id", None) or ""
|
||||
if hasattr(response, "_hidden_params"):
|
||||
model_id = response._hidden_params.get("model_id", None) or ""
|
||||
else:
|
||||
model_id = ""
|
||||
if (
|
||||
"stream" in data and data["stream"] == True
|
||||
): # use generate_responses to stream responses
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue