Commit 1e2cc8d
fix: address CodeRabbit v2 review findings
- Add stream_handle.arm() to streaming responses path for client
disconnect detection (matches chat_completions handler pattern)
- Add check_for_backend_error() to non-streaming responses path
to detect backend errors before committing to HTTP 200
- Fix error messages referencing "chat completions" → "responses"
- Populate output items in response.completed streaming event
(was sending empty output array)
- Remove dead current_fc_index field from ResponseStreamConverter
- Remove duplicate ListInputItemsOrder enum (reuse ListOrder)
- Remove redundant with_model override in ResponsesStreamPayload
- Add tracing::debug for skipped unsupported input item types
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Matej Kosec <mkosec@nvidia.com>1 parent 916fd40 commit 1e2cc8d
File tree
5 files changed
+54
-32
lines changed- lib
- async-openai/src/types/responses
- llm/src
- http/service
- protocols/openai/responses
- tests/utils
5 files changed
+54
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 33 | | |
44 | 34 | | |
45 | 35 | | |
| |||
75 | 65 | | |
76 | 66 | | |
77 | 67 | | |
78 | | - | |
| 68 | + | |
79 | 69 | | |
80 | 70 | | |
81 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1164 | 1164 | | |
1165 | 1165 | | |
1166 | 1166 | | |
1167 | | - | |
| 1167 | + | |
1168 | 1168 | | |
1169 | 1169 | | |
1170 | 1170 | | |
| |||
1181 | 1181 | | |
1182 | 1182 | | |
1183 | 1183 | | |
1184 | | - | |
| 1184 | + | |
1185 | 1185 | | |
1186 | 1186 | | |
1187 | 1187 | | |
| |||
1267 | 1267 | | |
1268 | 1268 | | |
1269 | 1269 | | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
1270 | 1275 | | |
1271 | 1276 | | |
1272 | 1277 | | |
| |||
1328 | 1333 | | |
1329 | 1334 | | |
1330 | 1335 | | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
1331 | 1346 | | |
1332 | | - | |
| 1347 | + | |
1333 | 1348 | | |
1334 | 1349 | | |
1335 | 1350 | | |
| |||
1343 | 1358 | | |
1344 | 1359 | | |
1345 | 1360 | | |
1346 | | - | |
| 1361 | + | |
1347 | 1362 | | |
1348 | 1363 | | |
1349 | 1364 | | |
1350 | | - | |
| 1365 | + | |
1351 | 1366 | | |
1352 | 1367 | | |
1353 | 1368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
323 | | - | |
| 322 | + | |
| 323 | + | |
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| |||
Lines changed: 31 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
| |||
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
75 | | - | |
76 | 74 | | |
77 | 75 | | |
78 | 76 | | |
| |||
83 | 81 | | |
84 | 82 | | |
85 | 83 | | |
86 | | - | |
| 84 | + | |
87 | 85 | | |
88 | 86 | | |
89 | 87 | | |
| |||
101 | 99 | | |
102 | 100 | | |
103 | 101 | | |
104 | | - | |
| 102 | + | |
105 | 103 | | |
106 | 104 | | |
107 | 105 | | |
| |||
144 | 142 | | |
145 | 143 | | |
146 | 144 | | |
147 | | - | |
| 145 | + | |
148 | 146 | | |
149 | 147 | | |
150 | 148 | | |
151 | 149 | | |
152 | 150 | | |
153 | | - | |
| 151 | + | |
154 | 152 | | |
155 | 153 | | |
156 | 154 | | |
| |||
301 | 299 | | |
302 | 300 | | |
303 | 301 | | |
304 | | - | |
305 | 302 | | |
306 | 303 | | |
307 | 304 | | |
| |||
399 | 396 | | |
400 | 397 | | |
401 | 398 | | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
402 | 425 | | |
403 | 426 | | |
404 | 427 | | |
405 | | - | |
| 428 | + | |
406 | 429 | | |
407 | 430 | | |
408 | 431 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | 550 | | |
557 | 551 | | |
558 | 552 | | |
| |||
0 commit comments