Data Routing Policy
data-routing-policy controls provider selection. It does not examine prompt
text. It filters providers.targets[] by customer-declared data_policy
metadata. This metadata is not a provider attestation or an automatic check of
provider terms.
Example configuration
pack:
name: regulated-routing
version: 1.0.0
enabled: true
providers:
targets:
- id: openai-zdr
provider: openai
model: your-openai-model
secret_key_ref:
env: VERDICTAN_OPENAI_API_KEY
data_policy:
zero_data_retention: true
training_opt_out: true
retention_days: 0
- id: azure-standard
provider: azure
provider_type: azure-openai
format: openai
model: your-azure-openai-model
base_url: https://replace-with-resource-name.openai.azure.com
secret_key_ref:
env: VERDICTAN_AZURE_OPENAI_API_KEY
azure_api_version: your-supported-api-version
azure_deployment: your-azure-deployment
data_policy:
zero_data_retention: false
training_opt_out: true
retention_days: 30
policies:
chain:
- data-routing-policy
policy:
data-routing-policy:
require_zero_data_retention: true
require_no_training: true
max_retention_days: 0
on_no_compliant_provider: block
log_provider_selection: true
Before you run the gateway, replace each model placeholder with an enabled value. Also replace the Azure deployment, resource name, and API version.
Provider metadata that this policy examines
Each target can declare a data_policy block with these fields:
| Field | Type | Meaning |
|---|---|---|
zero_data_retention | boolean | Customer-declared metadata records zero request and response retention. |
training_opt_out | boolean | Customer-declared metadata records that traffic is not used for training. |
retention_days | integer | Customer-declared retention period in days. |
Policy fields
| Field | Type | Notes |
|---|---|---|
require_zero_data_retention | boolean | Keep only targets with data_policy.zero_data_retention: true. |
require_no_training | boolean | Keep only targets with data_policy.training_opt_out: true. |
max_retention_days | integer | Exclude targets with declared retention that is more than this value. |
on_no_compliant_provider | string | block stops dispatch. warn continues with all targets when none match. |
log_provider_selection | boolean | Emit routing diagnostics for excluded targets. |
require_in_memory_only | boolean | Keep only targets with data_policy.in_memory_only: true. |
sanitize_before_provider | boolean | Keep only targets with data_policy.sanitized: true. This field does not sanitize request content. |
tokenize_sensitive_fields | boolean | Keep only targets with data_policy.accepts_tokenized_input: true. |
allow_internet_egress | boolean | When false, exclude targets that allow internet egress. |
local_only_processing | boolean | Keep only targets with data_policy.local_only_processing: true. |
More routing constraints
The fields above must have matching data_policy metadata on each provider
target. They filter declared target properties. They do not transform input or
verify an upstream provider contract.
Best practices
- Add a
data_policyblock to each target that the selector must compare. - Keep
retention_daysspecified so routing behavior stays predictable during reviews. - Use
on_no_compliant_provider: blockwhen dispatch must not continue without a matching target. - Use
warnonly when dispatch to all targets is an approved result.