Commit a400363
authored
Fix audio transcription deserialization when duration field is absent (#512)
The `duration` field on `AudioTranscriptionResponse` uses a custom
`deserialize_with`, which makes serde require the field to be present
in the JSON — even though it's `Option<f64>`. When the inference proxy
(vllm-proxy-rs) returns a response without a top-level `duration` field
(it nests it under `usage.seconds`), deserialization fails with
"missing field `duration`", causing a 502.
Fix: add `#[serde(default)]` so missing `duration` deserializes as `None`.1 parent 27c1161 commit a400363
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
992 | 992 | | |
993 | 993 | | |
994 | 994 | | |
| 995 | + | |
995 | 996 | | |
996 | 997 | | |
997 | 998 | | |
| |||
0 commit comments