Routing

model_to_header

Promotes the JSON "model" field from the request body to a request header.

Praxis AI v0.10.0 (alpha) 1 min read

Switching projects opens that project’s default documentation release.

Versions marked “overview” do not contain this page. Selecting one opens that version’s documentation overview.

On this page

Promotes the JSON "model" field from the request body to a request header.

Configuration Notes

The promoted value is also published to model_to_header.model metadata for downstream consumers (e.g. the llm_metrics model label), so those readers use the server-validated value instead of a client-supplied request header.

Promotion is deferred until end-of-stream so a later body-writing filter (for example llmisvc_model_provider_resolver) can observe the pending header in the same StreamBuffer pre-read pass.

Configuration

FieldTypeRequiredDescription
headerstringnoHeader name for the promoted model value. Must not be a hop-by-hop, framing, Host, credential, API-key, or internal x-praxis-* header. Defaults to X-Model.

Example

filter: model_to_header
header: X-Model   # optional, defaults to X-Model