forked from phoenix/litellm-mirror
fix(user_api_key_auth.py): use model
from query param
This commit is contained in:
parent
9ec6ebaeeb
commit
74d59d74d4
1 changed files with 5 additions and 1 deletions
|
@ -203,8 +203,12 @@ async def user_api_key_auth_websocket(websocket: WebSocket):
|
||||||
request = Request(scope={"type": "http"})
|
request = Request(scope={"type": "http"})
|
||||||
request._url = websocket.url
|
request._url = websocket.url
|
||||||
|
|
||||||
|
query_params = websocket.query_params
|
||||||
|
|
||||||
|
model = query_params.get("model")
|
||||||
|
|
||||||
async def return_body():
|
async def return_body():
|
||||||
return_string = '{{"model": "fake-openai-endpoint"}}'
|
return_string = f'{{"model": "{model}"}}'
|
||||||
# return string as bytes
|
# return string as bytes
|
||||||
return return_string.encode()
|
return return_string.encode()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue