@@ -1416,25 +1416,14 @@ async def test_google_model_function_call_without_text(google_provider: GooglePr
14161416 messages = [model_response ]
14171417 _ , contents = await model ._map_messages (list (messages )) # pyright: ignore[reportPrivateUsage]
14181418
1419- # Due to the bug in the implementation, there are two content items:
1420- # 1. The original (without added text)
1421- # 2. The modified one (with added text)
1422- assert len (contents ) == 2
1423-
1424- # The first content should be the unmodified original
1425- original_content = contents [0 ]
1426- assert isinstance (original_content , dict )
1427- assert original_content .get ('role' ) == 'model'
1428- parts = original_content .get ('parts' , [])
1429- assert isinstance (parts , list )
1430- assert len (parts ) == 1
1431- assert 'function_call' in parts [0 ]
1432-
1433- # The second content should have the added text
1434- modified_content = contents [1 ]
1435- assert isinstance (modified_content , dict )
1436- assert modified_content .get ('role' ) == 'model'
1437- parts = modified_content .get ('parts' , [])
1419+ # Should have exactly one content item with the function call and added text
1420+ assert len (contents ) == 1
1421+
1422+ # The content should have the added text along with the function call
1423+ content = contents [0 ]
1424+ assert isinstance (content , dict )
1425+ assert content .get ('role' ) == 'model'
1426+ parts = content .get ('parts' , [])
14381427 assert isinstance (parts , list )
14391428 assert len (parts ) == 2
14401429
0 commit comments