mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
fix(o_series_transformation.py): support o3 mini native streaming
Fixes https://github.com/BerriAI/litellm/issues/8274
This commit is contained in:
parent
efc2a886ee
commit
be6c850df9
2 changed files with 7 additions and 2 deletions
|
|
@ -35,11 +35,16 @@ class AzureOpenAIO1Config(OpenAIOSeriesConfig):
|
|||
if stream is not True:
|
||||
return False
|
||||
|
||||
if (
|
||||
model and "o3" in model
|
||||
): # o3 models support streaming - https://github.com/BerriAI/litellm/issues/8274
|
||||
return False
|
||||
|
||||
if model is not None:
|
||||
try:
|
||||
model_info = get_model_info(
|
||||
model=model, custom_llm_provider=custom_llm_provider
|
||||
)
|
||||
) # allow user to override default with model_info={"supports_native_streaming": true}
|
||||
|
||||
if (
|
||||
model_info.get("supports_native_streaming") is True
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ def test_azure_o3_streaming():
|
|||
) as e: # expect output translation error as mock response doesn't return a json
|
||||
print(e)
|
||||
assert mock_create.call_count == 1
|
||||
assert "stream" not in mock_create.call_args.kwargs
|
||||
assert "stream" in mock_create.call_args.kwargs
|
||||
|
||||
|
||||
def test_azure_o_series_routing():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue