Skip to content

Commit 6d48100

Browse files
ericapisaniclaude
andcommitted
fix(openai): Skip stream_options tests on OpenAI SDK <=1.1.0
The stream_options parameter was not available in early versions of the OpenAI Python SDK, causing TypeError on v1.0.1 CI runs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9f4b4fb commit 6d48100

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/integrations/openai/test_openai.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,10 @@ def test_streaming_chat_completion_no_prompts(
611611
pass # if tiktoken is not installed, we can't guarantee token usage will be calculated properly
612612

613613

614+
@pytest.mark.skipif(
615+
OPENAI_VERSION <= (1, 1, 0),
616+
reason="OpenAI versions <=1.1.0 do not support the stream_options parameter.",
617+
)
614618
def test_streaming_chat_completion_with_usage_in_stream(
615619
sentry_init,
616620
capture_events,
@@ -689,6 +693,10 @@ def test_streaming_chat_completion_with_usage_in_stream(
689693
assert span["data"]["gen_ai.usage.total_tokens"] == 30
690694

691695

696+
@pytest.mark.skipif(
697+
OPENAI_VERSION <= (1, 1, 0),
698+
reason="OpenAI versions <=1.1.0 do not support the stream_options parameter.",
699+
)
692700
@pytest.mark.asyncio
693701
async def test_streaming_chat_completion_async_with_usage_in_stream(
694702
sentry_init,

0 commit comments

Comments
 (0)