[Frontend] Standardize use of create_error_response#32319
[Frontend] Standardize use of create_error_response#32319DarkLight1337 merged 2 commits intovllm-project:mainfrom
create_error_response#32319Conversation
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
There was a problem hiding this comment.
Code Review
This pull request effectively standardizes error handling by consistently using the create_error_response function and sanitizing error messages across numerous API endpoints. This is a significant improvement for code consistency and security. The centralization of exception handling for specific errors like OverflowError and NotImplementedError within create_error_response is a clean and robust approach. The changes in this PR are correct and well-executed. To fully complete this standardization effort, you might consider updating a few more locations in a follow-up, such as create_transcriptions, create_translations, and create_messages in vllm/entrypoints/openai/api_server.py, and detokenize in vllm/entrypoints/serve/tokenize/api_router.py, which still use the older error handling pattern. Overall, this is a valuable refactoring.
…2319) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
…2319) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
…2319) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
…2319) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
…2319) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
…2319) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
…2319) Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Fix: GHSA-4r2x-xpjr-7cvv - [Frontend] Improve error message (vllm-project#31987) - [Frontend] Standardize use of `create_error_response` (vllm-project#32319) - [Misc] Bump opencv-python dependecy version to 4.13 (vllm-project#32668) https://issues.redhat.com/browse/INFERENG-4411
Fix: GHSA-4r2x-xpjr-7cvv - [Frontend] Improve error message (vllm-project/vllm#31987) - [Frontend] Standardize use of `create_error_response` (vllm-project/vllm#32319) - [Misc] Bump opencv-python dependecy version to 4.13 (vllm-project/vllm#32668) https://issues.redhat.com/browse/INFERENG-4411 https://issues.redhat.com/browse/RHOAIENG-48365
Purpose
Follow-up to #31987, ensure that the error message is sanitized properly.
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.