Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@krrishdholakia
Copy link
Contributor

Title

Correctly handle Vertex content policy violation error

Relevant issues

Fixes #4270

Type

πŸ› Bug Fix

Changes

  • adds checking if finish reason given is a content policy violation one -> if so, raises a 400 status code error, with the error, original message, explanation of finish reason

[REQUIRED] Testing - Attach a screenshot of any new tests passing locall

If UI changes, send a screenshot/GIF of working UI fixes

  • new test_gemini_pro_json_schema_httpx_content_policy_error which asserts if flagged response is correctly handled
Screenshot 2024-06-18 at 7 04 04 PM

@vercel
Copy link

vercel bot commented Jun 19, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
litellm βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jun 19, 2024 2:04am

@krrishdholakia krrishdholakia merged commit d96ffe8 into main Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Vertex AI httpx - candidatesTokenCount is in the response optionally?

2 participants