Repository navigation
Commit f44e8ee
fix(python): discard stale checkpoint token on non-resumable finish reason
When a streaming response terminates with a non-resumable `finish_reason` (e.g., `STOP`, `MAX_TOKENS`, `SAFETY`), clear any intermediate checkpoint `continuation_token` received earlier in the same hop so a trailing stream error does not resume from an obsolete checkpoint.
PiperOrigin-RevId: 9980724551 parent 411efe0 commit f44e8ee
2 files changed
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6173 | 6173 | | |
6174 | 6174 | | |
6175 | 6175 | | |
| 6176 | + | |
| 6177 | + | |
| 6178 | + | |
| 6179 | + | |
| 6180 | + | |
| 6181 | + | |
| 6182 | + | |
6176 | 6183 | | |
6177 | 6184 | | |
6178 | 6185 | | |
| |||
8432 | 8439 | | |
8433 | 8440 | | |
8434 | 8441 | | |
| 8442 | + | |
| 8443 | + | |
| 8444 | + | |
| 8445 | + | |
| 8446 | + | |
| 8447 | + | |
| 8448 | + | |
8435 | 8449 | | |
8436 | 8450 | | |
8437 | 8451 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2095 | 2095 | | |
2096 | 2096 | | |
2097 | 2097 | | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
2098 | 2116 | | |
2099 | 2117 | | |
2100 | 2118 | | |
| |||
2250 | 2268 | | |
2251 | 2269 | | |
2252 | 2270 | | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
| 2286 | + | |
| 2287 | + | |
| 2288 | + | |
| 2289 | + | |
0 commit comments