Skip to content

Reject negative TRT-LLM seed values#8822

Open
fallintoplace wants to merge 1 commit into
triton-inference-server:mainfrom
fallintoplace:fix/trtllm-negative-seed
Open

Reject negative TRT-LLM seed values#8822
fallintoplace wants to merge 1 commit into
triton-inference-server:mainfrom
fallintoplace:fix/trtllm-negative-seed

Conversation

@fallintoplace

Copy link
Copy Markdown

Summary

This rejects negative seed values when building TRT-LLM-format generation requests.

The public OpenAI schemas currently allow signed 64-bit seeds, but the TRT-LLM request path sends the value as a uint64 tensor. Without this check, schema-valid negative values fail during NumPy conversion instead of returning a clear client error.

Why

A request such as seed: -1 should be handled as invalid input for this request format before request tensor construction. Returning seed must be non-negative keeps the error actionable and prevents an implementation-level overflow failure.

Tests

  • git diff --check -- python/openai/openai_frontend/engine/utils/triton.py python/openai/tests/test_triton_utils.py
  • python3 -m py_compile python/openai/openai_frontend/engine/utils/triton.py python/openai/tests/test_triton_utils.py

I could not run the targeted pytest locally because this checkout's Python environment is missing the OpenAI frontend test/runtime packages (numpy, pydantic, pytest, and tritonserver).

@fallintoplace fallintoplace marked this pull request as ready for review June 6, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant