Skip to content

[Feature]: Allow user defined extra request args to be logged in OpenAI compatible server #5467

@davidgxue

Description

@davidgxue

🚀 The feature, motivation and pitch

Motivation
Using universal request ID/UUID when logging is common practice for production systems involving multiple components. My team wanted to use an UUID from upstream to trace logs produced by vLLM's OpenAI compatible webserver, but it doesn't seem like this is supported. Currently, vLLM generates its own UUID for each request, but it is 1. a separate ID, adding difficulty for tracing 2. the request ID does not always return to the API calling client, such as in cases of errors.

Solution
Allow extra args defined by the user to be passed in via a request to the OpenAI compatible frontend server, such that it can be propagated and logged via the logger.

  • Currently, the server will throw an error for the extra args passed via the request body.
  • The current proposal is to allow any extra args to be passed in via request body, and the extra args not matching supported args will just be logged during logging
  • See below for alternatives

Alternatives

  • Alternatively, allow user to pass in extra args via request header instead of request body
  • Alternatively, allow user to pass all extra args via a single field (e.g. "extra_args": "{ field1 : val1, field2: val2}") so we don't disrupt the current behavior of throwing an error when unknown request fields are passed in.

Additional context

If this is approved and details are finalized, I can work on this and make a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or requeststaleOver 90 days of inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions