You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: trtllm-serve /v1/chat/completions rejects the standard OpenAI field safety_identifier with 400 #20962
TensorRT-LLM main @ 61dba71, trtllm-serve OpenAI-compatible server (tensorrt_llm/serve/openai_protocol.py). This is a request-schema bug, so it does not depend on the model or GPU. I reproduced it at the schema level on CPU (Python 3.11, pydantic 2.14.1); no GPU involved.
The request is served. safety_identifier is part of OpenAI's Chat Completions request body. The OpenAI SDK documents user as "being replaced by safety_identifier and prompt_cache_key", so clients migrating off user send it on every request.
actual behavior
1 validation error for ChatCompletionRequest
{'type': 'extra_forbidden', 'loc': ('safety_identifier',), 'msg': 'Extra inputs are not permitted', 'input': 'user-7f3a9c'}
ChatCompletionRequest inherits extra="forbid" from OpenAIBaseModel and declares user but not safety_identifier.
additional notes
This is the counterpart of #20367 (prompt_cache_key, fix in review in #20368) for the other field that replaces user. user is accepted and ignored, and safety_identifier can be handled the same way: the server does no end-user abuse detection. I have a fix with a CPU unit test and the API-stability reference row ready, and will open the PR right after this issue.
Activity