@@ -27,7 +27,7 @@ def test_chat_completion_basic(client):
2727 )
2828
2929 print (completion .choices [0 ].message )
30-
30+
3131 assert completion is not None
3232 assert len (completion .choices ) > 0
3333 assert completion .choices [0 ].message .content is not None
@@ -40,7 +40,7 @@ def test_chat_completion_with_system_message(client):
4040 {"role" : "user" , "content" : "Hello!" }
4141 ]
4242 )
43-
43+
4444 assert completion is not None
4545 assert len (completion .choices ) > 0
4646 assert completion .choices [0 ].message .content is not None
@@ -54,7 +54,7 @@ async def test_chat_completion_async(client):
5454 {"role" : "user" , "content" : "Hello!" }
5555 ]
5656 )
57-
57+
5858 assert completion is not None
5959 assert len (completion .choices ) > 0
6060 assert completion .choices [0 ].message .content is not None
@@ -70,15 +70,19 @@ def test_chat_completion_stream(client):
7070
7171 # Verify we get a valid stream
7272 assert completion is not None
73-
73+
7474 # Process the stream and verify chunks
7575 chunk_count = 0
7676 for chunk in completion :
7777 assert chunk is not None
7878 assert chunk .data is not None
7979 assert len (chunk .data .choices ) > 0
8080 assert chunk .data .choices [0 ].delta is not None
81+ assert chunk .data .system_fingerprint is not None
82+ assert chunk .data .usage is not None
83+ assert chunk .data .service_tier is not None
8184 chunk_count += 1
82-
85+
8386 # Verify we got multiple chunks
8487 assert chunk_count > 0
88+
0 commit comments