Filter settings
Filter Reference
AI filters provided by Praxis AI, grouped by the task they serve. For base proxy filters (router, load balancer, headers, CORS, etc.), see the Praxis core filter reference.
On this page
AI filters provided by Praxis AI, grouped by the task they serve. For base proxy filters (router, load balancer, headers, CORS, etc.), see the Praxis core filter reference.
Client APIs and translation
Parse client request bodies, publish protocol facts, and translate between OpenAI and Anthropic request and stream formats.
| Filter | Description |
|---|---|
anthropic_messages_protocol | Normalizes Anthropic Messages protocol headers for native backends. |
anthropic_messages_request | Processes an Anthropic create-message body once and publishes its facts. |
anthropic_messages_to_chat_completions | Transforms Anthropic Messages API requests to Chat Completions-compatible request bodies and transforms compatible responses back. The name refers to the Chat Completions wire shape, not the OpenAI Responses API; any Chat Completions-compatible backend is a valid target, not only OpenAI. |
anthropic_messages_to_chat_completions_stream | Transforms streaming SSE responses between the Chat Completions and Anthropic Messages formats, processing each chunk as it arrives. |
openai_chat_completions_request | Publishes body facts for native Chat Completions create requests to durable metadata and filter results. |
openai_chat_completions_streaming_selector | Selects the typed IRR response transport from an OpenAI Chat Completions request’s effective stream bit. |
openai_chat_completions_to_anthropic | Translates OpenAI Chat Completions requests only when the selected ExternalModel candidate uses Anthropic Messages; OpenAI candidates pass through with their configured path and model. |
openai_chat_completions_to_anthropic_stream | Converts the selected Anthropic provider’s event stream incrementally. OpenAI-compatible candidates are left byte-for-byte unchanged. |
openai_client_tool_compat | Lowers rich client-owned tool declarations to private function tools for a function-only Responses backend and restores the typed items on the way back. |
openai_responses_model_rewrite | Rewrites the model field in Responses and Chat Completions request bodies. |
openai_responses_request | Processes a Responses request body once and initializes state. |
openai_responses_to_chat_completions | Translates canonical Responses create requests for a Chat Completions backend. |
openai_stream_events | Composes the current IRR execution into one logical Responses stream. |
openai_tool_parse | Parses tool definitions and tool_choice from Responses API request bodies and promotes routing facts to metadata and filter results without mutating the body. |
Provider adapters and credentials
Adapt requests to cloud provider dialects and attach provider, cloud identity, or callout credentials.
| Filter | Description |
|---|---|
anthropic_messages_to_vertexai_anthropic | Translates Anthropic Messages requests to Vertex AI rawPredict and Vertex responses back to the Anthropic dialect. |
aws_sigv4_sign | Signs outbound requests to AWS services using SigV4. |
azure_ad | Injects an Azure AD (Entra ID) bearer token into outbound requests. |
callout_credentials | Establishing filter that captures typed per-user callout secrets from ingress headers. |
credential_inject | Replaces caller credentials with the upstream credential selected by intelligent_route or provider_route. |
gcp_adc | Injects a GCP OAuth2 access token into outbound requests. |
openai_chat_completions_to_azureai_chat_completions | Transforms requests targeting Azure OpenAI deployments into standard Chat Completions-compatible form and normalizes responses back. |
openai_chat_completions_to_vertexai_gemini | Transforms OpenAI Chat Completions requests into Vertex AI Gemini generateContent format and translates responses back. |
Routing
Promote model names and select upstream clusters or provider-local backends.
| Filter | Description |
|---|---|
intelligent_route | Selects an upstream cluster from a site/capability descriptor by matching either an inference model name or MCP tool name. |
llmisvc_model_provider_resolver | Rewrites publisher-ID body model values to the short model name for LLMISvc / KServe routing; the routing header is left unchanged. |
model_to_header | Promotes the JSON "model" field from the request body to a request header. |
model_to_provider | Maps stable client-facing model IDs to existing upstream clusters and provider-specific target models. |
provider_route | Exact provider-local mapping from an authenticated intelligent routing selection to a private backend cluster. |
Guardrails, limits, and metering
Screen content, guard identity headers, bound token use, track in-flight work, and check balances.
| Filter | Description |
|---|---|
ai_guardrails | Calls an external AI guardrail provider to evaluate request and response bodies. The provider determines whether content should be passed, blocked, or redacted. |
external_metering | Integrates with an external metering service for pre-request balance checks and post-response token usage reporting. |
identity_header_guard | Captures request headers matching a configured prefix into filter_metadata and removes them from the upstream request. |
inflight_tracker | Tracks live request counts and reserved tokens per model. |
token_ceiling | Rejects provider-bound requests whose estimated serialized request body or requested output exceeds configured limits. Missing output-limit fields are rejected when max_output_tokens is configured; this strict behavior prevents providers from applying an unbounded model default. At least one of max_input_tokens or max_output_tokens is required, and max_body_bytes defaults to 2 MiB. |
token_rate_limit | Token-denominated rate limiter: reserves an estimated cost at admission, reconciles against actual usage after the response completes. Evaluates an ordered list of rules, each with its own optional match condition, algorithm choice, and budget. |
Agents, tools, and state
Route MCP and A2A traffic, manage Responses and Conversations state, and execute gateway-owned tools.
| Filter | Description |
|---|---|
a2a | Extracts A2A protocol metadata from JSON-RPC request bodies and promotes method, family, task ID, streaming detection, and version to request headers, filter results, and durable metadata for routing. |
anthropic_mcp_connector | Executes the Anthropic Messages MCP connector for non-Anthropic backends. |
anthropic_web_search | Executes server-owned WebSearch tool calls in an Anthropic Messages loop. |
mcp | Extracts MCP protocol metadata from JSON-RPC request bodies and promotes method, tool/resource/prompt name, JSON-RPC kind, protocol version, and session presence to request headers/filter results; stores session ID in durable metadata. |
mcp_broker_backend | Selects the broker-staged backend cluster for an MCP handshake subrequest. |
openai_agentic_loop | Agentic loop controller for the Responses API pipeline. |
openai_conversations | Handles all /v1/conversations endpoints locally. |
openai_doc_extract | Converts input_file content parts to input_text for backends that do not support input_file natively (e.g. vLLM, llm-d). |
openai_file_resolve | Resolves file_id and file_url references in Responses API input by fetching content from a Files API or remote URL via ApiClient and inlining the base64-encoded content in the provider-native field. |
openai_file_search_dispatch | Dispatches the loop owner’s pending file-search assignments against a vector store API compatible backend. |
openai_mcp_connector | Discovers and executes MCP tools for the Responses API agentic loop. |
openai_responses_compact | Summarizes conversation history when the token count exceeds a configured threshold. |
openai_responses_proxy | Rebuilds the request body from ResponsesState when present. |
openai_responses_rehydrate | Validates previous_response_id by fetching the stored response, confirming its status is "completed", and populating ResponsesState with the full conversation history (stored turns + current input). |
openai_responses_store | Persists Responses API responses to the configured response store backend. |
openai_web_search_dispatch | Web search filter for model-driven web_search_call dispatch. |
Observability and usage
Extract token usage and emit usage headers, usage metrics, and latency signals.
| Filter | Description |
|---|---|
stream_usage_inject | Injects stream_options.include_usage = true into streaming OpenAI chat-completions requests so the upstream response contains token usage. |
time_to_first_token | Measures time-to-first-token for streaming AI responses. |
token_count | Extracts token usage from AI inference responses and writes unified counts to [filter_metadata]. |
token_usage_headers | Injects Praxis-Token-Input, Praxis-Token-Output, and Praxis-Token-Total headers into downstream responses when token usage data is present in [filter_metadata]. Also injects Praxis-Token-Status when usage capture failed (e.g. overflow), so an unavailable count is never silently indistinguishable from a genuine zero. |
token_usage_metrics | Emits bounded per-tenant Prometheus token counters from token.* metadata. |
Core building blocks
Classify operations, call external services, change prompts, and establish state ownership.
| Filter | Description |
|---|---|
ai_operation | Classifies supported AI operations from the request head. |
http_callout | Calls an external HTTP service during request processing and feeds its response into branch-chain evaluation. |
project_state_owner_headers | Projects a normalized [StateOwner] into destination-specific HTTP headers. |
prompt_enrich | Injects statically configured messages into the messages array of OpenAI-compatible chat completion request bodies. |
state_owner | Establishes a normalized [StateOwner] from trusted identity sources. |