Skip to content
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

Support Body-to-Header Translation #321

Open
rramkumar1 opened this issue Feb 11, 2025 · 0 comments
Open

Support Body-to-Header Translation #321

rramkumar1 opened this issue Feb 11, 2025 · 0 comments

Comments

@rramkumar1
Copy link

As per OpenAI spec, it is standard for the model name to be included in the body of the HTTP request. Users of Inference Gateway likely want the ability to route requests based on the value of the body parameter. However, most implementations do not support routing based on request body.

It may be desirable to offer some sort of extension that populates an HTTP header with the value of the body parameter. This extension would only be called if the header has not already been populated by the client. Implementations can then route against the header (a much more common feature that is already supported natively via Gateway API).

A simple approach would be to open-source the code for the extension and publish the image along with the YAMLs required to deploy the extension in the cluster. Users can then hook up the extension using standard route extension APIs already supported by a number of implementations of Gateway API. Although there is no standard for this in Gateway API, we expect that to come soon..

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

No branches or pull requests

1 participant