LiteLLM Minor Fixes & Improvements (11/06/2024) (#6624)

* refactor(proxy_server.py): add debug logging around license check event (refactor position in startup_event logic)

* fix(proxy/_types.py): allow admin_allowed_routes to be any str

* fix(router.py): raise 400-status code error for no 'model_name' error on router

Fixes issue with status code when unknown model name passed with pattern matching enabled

* fix(converse_handler.py): add claude 3-5 haiku to bedrock converse models

* test: update testing to replace claude-instant-1.2

* fix(router.py): fix router.moderation calls

* test: update test to remove claude-instant-1

* fix(router.py): support model_list values in router.moderation

* test: fix test

* test: fix test
This commit is contained in:
Krish Dholakia 2024-11-07 04:37:32 +05:30 committed by GitHub
parent 136693cac4
commit 0c204d33bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 180 additions and 130 deletions

View file

@ -1866,16 +1866,9 @@ async def test_router_amoderation():
router = Router(model_list=model_list)
## Test 1: user facing function
result = await router.amoderation(
model="openai-moderations", input="this is valid good text"
model="text-moderation-stable", input="this is valid good text"
)
## Test 2: underlying function
result = await router._amoderation(
model="openai-moderations", input="this is valid good text"
)
print("moderation result", result)
def test_router_add_deployment():
initial_model_list = [