Commit ea6a2ed
Anusha Gangadi
[Bugfix] Fix ResponseCreatedEvent ValidationError for json_schema format in streaming
Remove `.model_dump()` from `ResponsesResponse` before passing to
`ResponseCreatedEvent` and `ResponseInProgressEvent`. The `.model_dump()`
serialized using Python attribute names (e.g. `schema_`) but Pydantic
re-validation expected JSON alias names (e.g. `schema`), causing a
ValidationError when `text.format.type: json_schema` was used with streaming.
This makes `ResponseCreatedEvent`/`ResponseInProgressEvent` construction
consistent with `ResponseCompletedEvent`, which already passes the object
directly.
Signed-off-by: Anusha Gangadi <agangadi@nvidia.com>1 parent 3b30e61 commit ea6a2ed
File tree
2 files changed
+58
-1
lines changed- tests/v1/entrypoints/openai/serving_responses
- vllm/entrypoints/openai/responses
2 files changed
+58
-1
lines changedLines changed: 57 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
53 | 110 | | |
54 | 111 | | |
55 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2490 | 2490 | | |
2491 | 2491 | | |
2492 | 2492 | | |
2493 | | - | |
| 2493 | + | |
2494 | 2494 | | |
2495 | 2495 | | |
2496 | 2496 | | |
| |||
0 commit comments