Request Validate

Rejects empty, malformed, or non-object JSON request bodies

Category: Setup-dependent integration
Task: Rejects empty, malformed, or non-object JSON request bodies

Prerequisites: The external service, credentials, or certificates referenced by this configuration.

Run it: Use ghcr.io/praxis-proxy/ai:0.5.0 and follow the container quickstart 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.

# Validates Anthropic Messages JSON envelopes before forwarding
#
# Rejects empty, malformed, or non-object JSON request bodies.
# Anthropic API semantics such as required fields and parameter
# ranges are left to the inference backend.

listeners:
  - name: anthropic-gateway
    address: "127.0.0.1:8080"
    filter_chains: [anthropic-validate]

filter_chains:
  - name: anthropic-validate
    filters:
      # anthropic_messages_format wraps the shared AI classifier and applies
      # /v1/messages plus anthropic-version disambiguation before validation.
      - filter: anthropic_messages_format
        on_invalid: reject

      - filter: anthropic_validate
        max_body_bytes: 1048576

      - filter: router
        routes:
          - path: "/v1/messages"
            cluster: "anthropic-backend"

      - filter: load_balancer
        clusters:
          - name: "anthropic-backend"
            endpoints:
              - "127.0.0.1:3001"

insecure_options:
  allow_private_endpoints: true # example proxies to local backends