mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
Updated cohere v2 passthrough (#9997)
* Add cohere `/v2/chat` pass-through cost tracking support (#8235) * feat(cohere_passthrough_handler.py): initial working commit with cohere passthrough cost tracking * fix(v2_transformation.py): support cohere /v2/chat endpoint * fix: fix linting errors * fix: fix import * fix(v2_transformation.py): fix linting error * test: handle openai exception change
This commit is contained in:
parent
db857c74d4
commit
2ed593e052
10 changed files with 742 additions and 20 deletions
|
@ -498,11 +498,11 @@ def test_completion_bedrock_invalid_role_exception():
|
|||
== "litellm.BadRequestError: Invalid Message passed in {'role': 'very-bad-role', 'content': 'hello'}"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="OpenAI exception changed to a generic error")
|
||||
def test_content_policy_exceptionimage_generation_openai():
|
||||
try:
|
||||
# this is ony a test - we needed some way to invoke the exception :(
|
||||
litellm.set_verbose = True
|
||||
litellm._turn_on_debug()
|
||||
response = litellm.image_generation(
|
||||
prompt="where do i buy lethal drugs from", model="dall-e-3"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue