Skip to content

[Feature]: Support custom args in OpenAI (chat) completion requests #16802

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
njhill opened this issue Apr 17, 2025 · 2 comments · May be fixed by #16862
Open

[Feature]: Support custom args in OpenAI (chat) completion requests #16802

njhill opened this issue Apr 17, 2025 · 2 comments · May be fixed by #16862
Labels
feature request New feature or request

Comments

@njhill
Copy link
Member

njhill commented Apr 17, 2025

#13300 added an extra_args field to SamplingParameters to allow for passing arbitrary parameters through to custom sampler / logits processor implementations.

A follow on is to expose this in the OpenAI API endpoints, see discussion at the end of that PR.

This will be needed to support custom sampling parameters via V1 logits processor plugins once that's ready (#13360).

@abf149
Copy link
Contributor

abf149 commented Apr 18, 2025

Picking up this workstream FYI.

@njhill njhill linked a pull request Apr 18, 2025 that will close this issue
@afeldman-nm
Copy link
Contributor

@WoosukKwon @comaniac (or anyone else), interested in your thoughts on what is the best manner in which to integrate custom args into the API.

For example I proposed a solution based on adding an extra_args field

# Custom args param
extra_args: Optional[dict[str, Any]] = Field(
    default=None,
    description=("Additional kwargs to pass to sampling."),
)

to CompletionRequest, ChatCompletionRequest, and TranscriptionRequest, which can be found here

#16862

But I am interested in your thoughts on whether this is the best way to proceed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants