Commit 0aac440
committed
fix: Fix Vertex AI Live API session replay on reconnect / modality switch
Previously seeding Gemini 3.1 live history on Vertex AI collapsed turns into a single user turn and hardcoded turn_complete=True, causing the model to immediately trigger a tool call upon reconnect. Since history_config is now supported on Vertex AI, we can remove the workaround and determine turn_complete based on the last turn role (preventing model execution when history ends in a model turn)
Change-Id: I624a7adc8acdd9a88f0fc17e08051ac8a5b6f9bd1 parent e72bf9b commit 0aac440
2 files changed
Lines changed: 22 additions & 40 deletions
File tree
- src/google/adk/models
- tests/unittests/models
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 86 | | |
105 | 87 | | |
106 | 88 | | |
107 | | - | |
108 | | - | |
109 | | - | |
| 89 | + | |
110 | 90 | | |
111 | 91 | | |
112 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1507 | 1507 | | |
1508 | 1508 | | |
1509 | 1509 | | |
1510 | | - | |
| 1510 | + | |
1511 | 1511 | | |
1512 | 1512 | | |
1513 | 1513 | | |
1514 | 1514 | | |
1515 | 1515 | | |
1516 | 1516 | | |
1517 | 1517 | | |
1518 | | - | |
1519 | 1518 | | |
1520 | | - | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
1521 | 1522 | | |
1522 | 1523 | | |
1523 | 1524 | | |
1524 | | - | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
1525 | 1530 | | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
1526 | 1537 | | |
1527 | | - | |
| 1538 | + | |
1528 | 1539 | | |
1529 | 1540 | | |
1530 | 1541 | | |
1531 | 1542 | | |
1532 | 1543 | | |
1533 | | - | |
1534 | | - | |
| 1544 | + | |
| 1545 | + | |
1535 | 1546 | | |
1536 | 1547 | | |
1537 | 1548 | | |
| |||
1547 | 1558 | | |
1548 | 1559 | | |
1549 | 1560 | | |
1550 | | - | |
1551 | | - | |
1552 | | - | |
1553 | | - | |
1554 | | - | |
1555 | | - | |
1556 | | - | |
1557 | | - | |
1558 | | - | |
1559 | | - | |
1560 | | - | |
1561 | | - | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
1562 | 1564 | | |
1563 | 1565 | | |
1564 | 1566 | | |
| |||
0 commit comments