Skip to content

Support Body-to-Header Translation #321

@rramkumar1

Description

@rramkumar1

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..

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions