Commit fa2c405
authored
[STT] Refactor request boundary and enforce fail-fast runner behavior (#157)
This PR is:
- To move STT request parsing and validation out of the runtime path.
- To make the v1 STT runner use one normalized internal request shape.
- To fail fast on bad STT requests instead of silently returning
fallback output.
### Refactor (why this is needed)
The STT runtime path was doing two jobs:
- parsing raw vLLM request shapes
- running STT encode/decode
That made the code harder to maintain and could hide invalid input.
This refactor keeps responsibilities clear:
- serve boundary: parse + validate
- runtime path: execute only
### Note
- Added STT request adapter and normalized DTO in
`vllm_metal/stt/serve.py`.
- Added fail-fast validation for missing/invalid `req_id`,
`prompt_token_ids`, `mm_features`, and `input_features`.
- Updated `_execute_stt` to normalize request first, then run
extract/decode.
- Removed silent malformed-input fallback behavior.
---------
Signed-off-by: Yuan Lik Xun <lxyuan0420@gmail.com>1 parent a00cba6 commit fa2c405
4 files changed
Lines changed: 246 additions & 255 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
0 commit comments