mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
Litellm dev 12 28 2024 p2 (#7458)
* docs(sidebar.js): docs for support model access groups for wildcard routes * feat(key_management_endpoints.py): add check if user is premium_user when adding model access group for wildcard route * refactor(docs/): make control model access a root-level doc in proxy sidebar easier to discover how to control model access on litellm * docs: more cleanup * feat(fireworks_ai/): add document inlining support Enables user to call non-vision models with images/pdfs/etc. * test(test_fireworks_ai_translation.py): add unit testing for fireworks ai transform inline helper util * docs(docs/): add document inlining details to fireworks ai docs * feat(fireworks_ai/): allow user to dynamically disable auto add transform inline allows client-side disabling of this feature for proxy users * feat(fireworks_ai/): return 'supports_vision' and 'supports_pdf_input' true on all fireworks ai models now true as fireworks ai supports document inlining * test: fix tests * fix(router.py): add unit testing for _is_model_access_group_for_wildcard_route
This commit is contained in:
parent
3eb962c594
commit
cfb6890b9f
19 changed files with 832 additions and 305 deletions
|
@ -364,3 +364,23 @@ async def test_get_remaining_model_group_usage():
|
|||
assert remaining_usage is not None
|
||||
assert "x-ratelimit-remaining-requests" in remaining_usage
|
||||
assert "x-ratelimit-remaining-tokens" in remaining_usage
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"potential_access_group, expected_result",
|
||||
[("gemini-models", True), ("gemini-models-2", False), ("gemini/*", False)],
|
||||
)
|
||||
def test_router_get_model_access_groups(potential_access_group, expected_result):
|
||||
router = Router(
|
||||
model_list=[
|
||||
{
|
||||
"model_name": "gemini/*",
|
||||
"litellm_params": {"model": "gemini/*"},
|
||||
"model_info": {"id": 1, "access_groups": ["gemini-models"]},
|
||||
},
|
||||
]
|
||||
)
|
||||
access_groups = router._is_model_access_group_for_wildcard_route(
|
||||
model_access_group=potential_access_group
|
||||
)
|
||||
assert access_groups == expected_result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue