mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(router.py): handle edge case where user sets 'model_group' inside… (#10191)
* fix(router.py): handle edge case where user sets 'model_group' inside 'model_info' * fix(key_management_endpoints.py): security fix - return hashed token in 'token' field Ensures when creating a key on UI - only hashed token shown * test(test_key_management_endpoints.py): add unit test * test: update test
This commit is contained in:
parent
03245c732a
commit
0c3b7bb37d
5 changed files with 107 additions and 22 deletions
|
@ -4983,8 +4983,12 @@ class Router:
|
|||
)
|
||||
|
||||
if model_group_info is None:
|
||||
model_group_info = ModelGroupInfo(
|
||||
model_group=user_facing_model_group_name, providers=[llm_provider], **model_info # type: ignore
|
||||
model_group_info = ModelGroupInfo( # type: ignore
|
||||
**{
|
||||
"model_group": user_facing_model_group_name,
|
||||
"providers": [llm_provider],
|
||||
**model_info,
|
||||
}
|
||||
)
|
||||
else:
|
||||
# if max_input_tokens > curr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue