Examples
Policy Llm Input
Denies inference requests by what they ask of the model, using the normalized llm.input. facts the proxy derives from the request body: offered tools, tool choice, completion cap, and ordered instructions
Category: Setup-dependent integration
Task: Denies inference requests by what they ask of the model, using the normalized llm.input. facts the proxy derives from the request body: offered tools, tool choice, completion cap, and ordered instructions
Prerequisites: The external service, credentials, or certificates referenced by this configuration.
Run it: Use ghcr.io/praxis-proxy/praxis:0.8.0 and follow the first reverse-proxy tutorial to mount and start the configuration.
This configuration comes from the selected release. The example has not been run here; external services are not bundled.
Download the source file.
Companion resources from the same snapshot:
# Inference Input Policy
#
# Denies inference requests by what they ask of the model, using the
# normalized `llm.input.*` facts the proxy derives from the request body:
# offered tools, tool choice, completion cap, and ordered instructions.
#
# The proxy normalizes Chat Completions and Anthropic Messages bodies. A
# request it cannot fully account for, such as an unknown tool type, leaves
# the `llm.input.*` facts absent; pair rules with
# `!exists(llm.input.offered_tools): deny` to refuse what policy cannot see.
#
# Point `config_path` at an operator-supplied policy. The integration fixture
# at `tests/integration/fixtures/llm-input-policy.yaml` denies an offered
# `transfer_funds` tool, a completion cap above 4096 tokens, a forced tool
# other than `lookup_invoice`, and instructions other than the pinned prompt.
#
filter_chains:
- name: main
filters:
- filter: policy
config_path: /etc/praxis/llm-input-policy.yaml
llm:
require_model: true
provider: openai
- filter: router
routes:
- path_prefix: "/v1/"
cluster: inference
- filter: load_balancer
clusters:
- name: inference
endpoints:
- "127.0.0.1:3000"
insecure_options:
allow_private_endpoints: true