mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
fix(router.py): improve error message returned for fallbacks
This commit is contained in:
parent
2bd993039b
commit
cccc55213b
3 changed files with 85 additions and 63 deletions
|
@ -1129,7 +1129,9 @@ async def test_router_content_policy_fallbacks(
|
|||
mock_response = Exception("content filtering policy")
|
||||
else:
|
||||
mock_response = litellm.ModelResponse(
|
||||
choices=[litellm.Choices(finish_reason="content_filter")]
|
||||
choices=[litellm.Choices(finish_reason="content_filter")],
|
||||
model="gpt-3.5-turbo",
|
||||
usage=litellm.Usage(prompt_tokens=10, completion_tokens=0, total_tokens=10),
|
||||
)
|
||||
router = Router(
|
||||
model_list=[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue