o1 - add image param handling (#7312)

* fix(openai.py): fix returning o1 non-streaming requests

fixes issue where fake stream always true for o1

* build(model_prices_and_context_window.json): add 'supports_vision' for o1 models

* fix: add internal server error exception mapping

* fix(base_llm_unit_tests.py): drop temperature from test

* test: mark prompt caching as a flaky test
This commit is contained in:
Krish Dholakia 2024-12-19 11:22:25 -08:00 committed by GitHub
parent a101c1fff4
commit 62b00cf28d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 68 additions and 79 deletions

View file

@ -280,6 +280,19 @@ class TestOpenAIChatCompletion(BaseLLMChatTest):
"""Test that tool calls with no arguments is translated correctly. Relevant issue: https://github.com/BerriAI/litellm/issues/6833"""
pass
def test_multilingual_requests(self):
"""
Tests that the provider can handle multilingual requests and invalid utf-8 sequences
Context: https://github.com/openai/openai-python/issues/1921
"""
base_completion_call_args = self.get_base_completion_call_args()
response = self.completion_function(
**base_completion_call_args,
messages=[{"role": "user", "content": "你好世界!\ud83e, ö"}],
)
assert response is not None
def test_completion_bad_org():
import litellm