Client APIs
openai_responses_model_rewrite
Rewrites the model field in Responses API request bodies.
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
Rewrites the model field in Responses API request bodies.
Configuration Notes
Quote wildcard alias keys in YAML, such as "gpt-4.1-*", so * is parsed as a literal character rather than YAML alias syntax. The examples quote all alias keys for consistency.
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
default_model | string | no | Model name to inject when the request body has no model field or when the field is null. |
headers | ModelRewriteHeaders | no | Header names for promoted model values. effective_model and original_model must use distinct names. |
headers.effective_model | string | no | Header name for the effective (post-rewrite) model value. Must not be a hop-by-hop, framing, Host, credential, API-key, or other internal x-praxis-* header. Dedicated default x-praxis-ai-effective-model remains allowed. Must differ from original_model. |
headers.original_model | string | no | Header name for the original (pre-rewrite) model value. Must not be a hop-by-hop, framing, Host, credential, API-key, or other internal x-praxis-* header. Dedicated default x-praxis-ai-original-model remains allowed. Must differ from effective_model. |
model_aliases | object<string, string> | no | Map from client-facing model names or single-wildcard patterns to backend model names. Quote wildcard keys in YAML. Exact aliases win before wildcard aliases; wildcard aliases are matched by literal specificity. |
on_invalid | continue | reject | no | Behavior when the body is not valid JSON. |
Examples
Example 1
filter: openai_responses_model_rewrite
default_model: "llama-3.3-70b"
model_aliases:
"codex-mini-latest": "llama-3.3-70b"
"gpt-4.1-*": "qwen-2.5-72b"
"gpt-4.1-mini": "qwen-2.5-72b"
Example 2
filter: openai_responses_model_rewrite
default_model: "llama-3.3-70b"
model_aliases:
"codex-mini-latest": "llama-3.3-70b"
"gpt-4.1-*": "qwen-2.5-72b"
on_invalid: continue
headers:
effective_model: x-praxis-ai-effective-model
original_model: x-praxis-ai-original-model