diff --git a/litellm/llms/openai/chat/o_series_transformation.py b/litellm/llms/openai/chat/o_series_transformation.py index d643b07680..3cc05b3c95 100644 --- a/litellm/llms/openai/chat/o_series_transformation.py +++ b/litellm/llms/openai/chat/o_series_transformation.py @@ -54,7 +54,7 @@ class OpenAIOSeriesConfig(OpenAIGPTConfig): if model is None: return True - supported_stream_models = ["o1-mini", "o1-preview"] + supported_stream_models = ["o1-mini", "o1-preview", "o3-mini"] for supported_model in supported_stream_models: if supported_model in model: return False diff --git a/tests/llm_translation/test_openai_o1.py b/tests/llm_translation/test_openai_o1.py index c4eec4ca5f..16b86414c2 100644 --- a/tests/llm_translation/test_openai_o1.py +++ b/tests/llm_translation/test_openai_o1.py @@ -204,3 +204,26 @@ def test_o3_reasoning_effort(): reasoning_effort="high", ) assert resp.choices[0].message.content is not None + + +def test_streaming_response(): + """Test that streaming response is returned correctly""" + from litellm import completion + + response = completion( + model="o3-mini", + messages=[ + {"role": "system", "content": "Be a good bot!"}, + {"role": "user", "content": "Hello!"}, + ], + stream=True, + ) + + assert response is not None + + chunks = [] + for chunk in response: + chunks.append(chunk) + + resp = litellm.stream_chunk_builder(chunks=chunks) + print(resp)