Skip to content

[Feature][CLI] Unify configuration for structured outputs via --structured-output-config #17420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

aarnphm
Copy link
Collaborator

@aarnphm aarnphm commented Apr 29, 2025

This PR introduces the args --structured-output-config as a way to unify all related structured outputs config in one CLI field.
This would help simplify general UX for specifying custom options with backends.

This means all previous arguments are considered deprecated, and --structured-output-config should be used going forward (v0.10.x)

This is the first of many to move all guided_decoding -> structured_output namespace. I plan to finish this migration by v0.10.x
for both OpenAI and all path within vLLM codebase.

Signed-off-by: Aaron Pham contact@aarnphm.xyz

Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@aarnphm aarnphm requested review from hmellor and removed request for comaniac, njhill, zhuohan123, youkaichao and alexm-redhat April 29, 2025 22:58
@aarnphm aarnphm changed the title [Feature][CLI] Unify configuration for structured outputs [Feature][CLI] Unify configuration for structured outputs via --structured-output-config Apr 29, 2025
@mergify mergify bot added documentation Improvements or additions to documentation structured-output v1 tool-calling labels Apr 29, 2025
description=DecodingConfig.__doc__,
description=StructuredOutputConfig.__doc__,
)
structured_output_group.add_argument(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

question for @hmellor:

For CLI do we want to add a deprecated=True to add_argument instead? right now I will just include notice in docstring

Copy link
Member

@hmellor hmellor Apr 29, 2025

Choose a reason for hiding this comment

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

Oh that's neat, yeah I'd prefer adding deprecated=True to the argument rather than changing the docstring when we are deprecating args.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will open a separate PR for this then

Copy link
Member

@hmellor hmellor left a comment

Choose a reason for hiding this comment

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

Not a full review but I've left some initial comments.

I'm not a huge fan of using JSON to bundle what could be separate arguments. As it is right now, each argument is listed and clearly described (which we get for free because we documented it in the dataclass anyway).

If you bundle it into JSON:

  • the documentation and --help text won't look as nice
  • you'll have to maintain separate documentation explaining all the args in the dataclass
  • it will become out of sync with the dataclass documentation

edit: After speaking to @aarnphm offline, I'm going to try adding the Config classes to the API reference directly. And then the JSON arg could reference that directly with no duplication or missing of information.

Copy link

mergify bot commented Apr 30, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @aarnphm.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@aarnphm aarnphm force-pushed the feat/decoding-args branch from 2c202cd to f092460 Compare April 30, 2025 00:15
@mergify mergify bot removed the needs-rebase label Apr 30, 2025
Copy link

mergify bot commented Apr 30, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @aarnphm.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@hmellor
Copy link
Member

hmellor commented Apr 30, 2025

@aarnphm I've made #17485 to add API docs for configs

@aarnphm aarnphm requested review from hmellor and russellb April 30, 2025 20:56
@mergify mergify bot removed the needs-rebase label Apr 30, 2025
@aarnphm aarnphm force-pushed the feat/decoding-args branch 2 times, most recently from 717a66a to b963e74 Compare April 30, 2025 21:02
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
@aarnphm aarnphm force-pushed the feat/decoding-args branch from b963e74 to bd2b2e0 Compare April 30, 2025 21:02
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
@aarnphm aarnphm force-pushed the feat/decoding-args branch from e299540 to c70b8cf Compare April 30, 2025 21:16
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
@mergify mergify bot added the frontend label Apr 30, 2025
@aarnphm aarnphm force-pushed the feat/decoding-args branch from 958eacf to 26419c4 Compare April 30, 2025 21:51
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
Copy link

mergify bot commented May 1, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @aarnphm.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label May 1, 2025
@mergify mergify bot removed the needs-rebase label May 1, 2025
Copy link

mergify bot commented May 1, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @aarnphm.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants