NVIDIA / NVIDIA/TensorRT-LLM

[Bug]: HTTP cluster storage returns 400 for valid empty results

Open Beginner friendly
#17,761 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Infra
Dominant language
Python
Stars
14.7k
Forks
2.8k
Avg merge
2d 23h
Merged PRs (30d)
489

Description

System Info

Platform-independent HTTP cluster-storage behavior on current main.

Reproduction

tensorrt_llm/serve/cluster_storage.py::jsonify() documents that only False and None results should map to HTTP 400, but the implementation uses generic truthiness:

status_code=200 if result else 400

As a result, valid empty values such as an empty stored string ("") or an empty prefix result ({}) are returned with HTTP 400 even though the operation succeeded.

Expected behavior

Return HTTP 400 only when the result is exactly False or None. Other JSON-serializable results, including empty strings and empty containers, should return HTTP 200.

Actual behavior

All falsey values are treated as failures.

Proposed fix

Use explicit identity checks for False and None, with CPU-only regression tests covering empty successful results and the existing failure cases.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in tensorrt_llm/serve/cluster_storage.py at jsonify() and inspect how result values determine the HTTP status. Add CPU-only regression coverage for empty stored strings, empty prefix results, and the existing False and None failures. Done means successful empty JSON-serializable results return HTTP 200 while exactly False and None return HTTP 400.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.