Skip to content

Conversation

@hmellor
Copy link
Member

@hmellor hmellor commented Sep 11, 2025

#13568 made the model parameter optional when making requests to vLLM. Unfortunately, this broke the behaviour of https://docs.vllm.ai/en/latest/cli/serve.html#-served-model-name.

This PR reinstates the original behaviour (while still allowing the model parameter to be optional).

Fixes #15845

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the logic for determining the model name in responses to fix an issue where --served-model-name was being ignored. The logic is centralized into a new OpenAIServingModels.model_name method, and all call sites are updated accordingly. The change correctly enforces the use of the served model name, which aligns with the stated goal. I have one critical suggestion to prevent a potential server crash.

Copy link
Member

@DarkLight1337 DarkLight1337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a regression test?

Signed-off-by: Harry Mellor <[email protected]>
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) September 11, 2025 14:39
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 11, 2025
@vllm-bot vllm-bot merged commit c1eda61 into vllm-project:main Sep 11, 2025
40 of 45 checks passed
@hmellor hmellor deleted the fix-model-name-returned branch September 11, 2025 20:40
skyloevil pushed a commit to skyloevil/vllm that referenced this pull request Sep 13, 2025
dsxsteven pushed a commit to dsxsteven/vllm_splitPR that referenced this pull request Sep 15, 2025
FeiDaLI pushed a commit to FeiDaLI/vllm that referenced this pull request Sep 25, 2025
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 10, 2025
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: served-model-name not being returned in model field of response

3 participants