[Bug]: trtllm-serve 1.3.0rc10 returns "Unknown modality: image" for Qwen2.5-VL-7B-Instruct-NVFP4 on DGX Spark
System Info
- device
- `DGX Spark`
- TensorRT-LLM version
- `1.3.0rc10`
- model
- `nv-community/Qwen2.5-VL-7B-Instruct-NVFP4`
- container
- `nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc10`
## Describe the bug
`trtllm-serve` returns `400 Bad Request` with `Unknown modality: image` when serving `nv-community/Qwen2.5-VL-7B-Instruct-NVFP4` on DGX Spark using TensorRT-LLM `1.3.0rc10`.
This happens even when the request uses OpenAI-compatible multimodal format with:
```json
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,..."
}
}
```
The same failure happens when calling TRT-LLM directly on `:8000`, so this is not caused by LiteLLM or the client.
## To Reproduce
### Docker Compose
```yaml
services:
trtllm-qwen7b:
image: nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc10
container_name: trtllm-qwen7b
restart: unless-stopped
ports:
- "8000:8000"
volumes:
- /home/xunchi/.cache/modelscope/hub/models/nv-community/Qwen2.5-VL-7B-Instruct-NVFP4:/qwen7b
- ./extra-llm-api-config.yml:/tmp/extra-llm-api-config.yml
- /data/trtllm_engines:/engines
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
shm_size: "24g"
environment:
- TZ=Asia/Shanghai
- LC_TIME=C
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
command: >
trtllm-serve serve
/qwen7b
--trust_remote_code
--host 0.0.0.0
--port 8000
--extra_llm_api_options /tmp/extra-llm-api-config.yml
```
### extra-llm-api-config.yml
```yaml
max_seq_len: 8192
max_batch_size: 16
max_num_tokens: 8192
trust_remote_code: true
kv_cache_config:
enable_block_reuse: false
free_gpu_memory_fraction: 0.82
```
### Direct request to TRT-LLM
```bash
curl http://<host>:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-test" \
-d '{
"model": "qwen7b",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image."
},
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,<base64_image>"
}
}
]
}
]
}'
```
## Expected behavior
`trtllm-serve` should accept the OpenAI-compatible multimodal chat request and process the image input for `Qwen2.5-VL-7B-Instruct-NVFP4`.
## Actual behavior
The request fails with HTTP 400:
```text
Bad Request Unknown modality: image
```
Client-side captured request shows that the request path is:
```text
http://192.168.10.158:8000/v1/chat/completions
```
and the request body contains:
```json
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,..."
}
}
```
but TRT-LLM still returns `Unknown modality: image`.
## Server log
```text
[TRT-LLM] [E] Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/serve/openai_server.py", line 864, in openai_chat
conversation, mm_coroutines, mm_placeholder_counts = parse_chat_messages_coroutines(
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/serve/chat_utils.py", line 279, in parse_chat_messages_coroutines
placeholder = mm_data_tracker.add_data(
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/inputs/utils.py", line 518, in add_data
placeholder = retrieve_multimodal_placeholder(self._model_type,
File "/usr/local/lib/python3.12/dist-packages/tensorrt_llm/inputs/utils.py", line 442, in retrieve_multimodal_placeholder
raise TypeError(f"Unknown modality: {modality}")
TypeError: Unknown modality: image
```
and then:
```text
POST /v1/chat/completions HTTP/1.1" 400 Bad Request
```
This stack trace was captured from the TRT-LLM container log.
## Additional context
* This is not caused by LiteLLM. The same issue reproduces when bypassing LiteLLM and calling TRT-LLM directly on port `8000`.
* This is not caused by using `type: "image"` in the client request. The request actually uses `type: "image_url"` with a base64 data URL.
* Text-only requests work normally.
* Multimodal image requests fail consistently.
* Is there a required serving path / backend / model-type-specific setting for `Qwen2.5-VL-7B-Instruct-NVFP4` on `trtllm-serve` in `1.3.0rc10`?
Who can help?
No response
Information
- [ ] The official example scripts
- [ ] My own modified scripts
Tasks
- [ ] An officially supported task in the
examplesfolder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below)
Reproduction
- Start
trtllm-servewith TensorRT-LLM1.3.0rc10on DGX Spark usingnv-community/Qwen2.5-VL-7B-Instruct-NVFP4. - Expose the OpenAI-compatible endpoint on port
8000. - Send a direct request to
/v1/chat/completionswith a multimodal message containing:- one text item
- one image item in OpenAI-compatible format using
type: "image_url"and a base64 data URL
- Observe that the server returns HTTP
400 Bad RequestwithUnknown modality: image.
curl http://<host>:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-test" \
-d '{
"model": "qwen7b",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image."
},
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,<base64_image>"
}
}
]
}
]
}'
### Expected behavior
`trtllm-serve` should accept the OpenAI-compatible multimodal request for `Qwen2.5-VL-7B-Instruct-NVFP4` and process the image input normally, instead of returning `Unknown modality: image`.
### actual behavior
The request fails with HTTP 400 and the server log shows `TypeError: Unknown modality: image`.
### additional notes
- Reproduced both through LiteLLM and by directly calling TRT-LLM on port `8000`.
- Direct TRT-LLM call still fails, so the issue does not appear to be caused by LiteLLM or the client.
- The client request uses OpenAI-compatible multimodal format with `type: "image_url"` and a base64 data URL, not `type: "image"`.
- Text-only requests work normally.
- Multimodal image requests fail consistently with the same `Unknown modality: image` error.
- `kv_cache_config.enable_block_reuse` is explicitly set to `false` for this multimodal setup.
- The issue was reproduced on `DGX Spark` with `TensorRT-LLM 1.3.0rc10` and model `nv-community/Qwen2.5-VL-7B-Instruct-NVFP4`.
- It would be helpful to know whether this is a known limitation / bug for this model on `trtllm-serve`, or whether a different backend / serving path / model-specific configuration is required for multimodal requests.
### Before submitting a new issue...
- [x] Make sure you already searched for relevant issues, and checked the [documentation](https://nvidia.github.io/TensorRT-LLM/) and [examples](https://github.com/NVIDIA/TensorRT-LLM/tree/main/examples) for answers to frequently asked questions.
I checked the current supported-models.md on main.
Qwen-related entries include:
Qwen2ForCausalLMQwen2ForProcessRewardModelQwen2ForRewardModelQwen3ForCausalLMQwen3MoeForCausalLMQwen3NextForCausalLMQwen3_5MoeForCausalLM
but I do not see Qwen2.5-VL listed there.
In the current multimodal feature support matrix, I only see:
Gemma3ForConditionalGenerationHCXVisionForCausalLMLlavaLlamaModel (VILA)LlavaNextForConditionalGenerationLlama4ForConditionalGenerationMistral3ForConditionalGeneration
I do not see Qwen2.5-VL in that multimodal support matrix either.
Could you confirm whether Qwen2.5-VL-7B-Instruct-NVFP4 is officially supported by trtllm-serve in 1.3.0rc10, or whether this model is currently unsupported for multimodal serving?
A fix has been merged to the main branch: https://github.com/NVIDIA/TensorRT-LLM/pull/14068. Please try the PR or the subsequent RC. Thanks!
Issue has not received an update in over 14 days. Adding stale label.
This issue was closed because it has been 14 days without activity since it has been marked as stale.