Dry-Run / Observe Mode
Dry-Run / Observe Mode¶
Send requests through the gateway without enforcing decisions, ideal for testing policies before enabling them in production. Add the X-Xybern-Dry-Run: true header to any gateway request.
from openai import OpenAI
client = OpenAI(
api_key="sk-...",
base_url="https://www.xybern.com/gateway/openai",
default_headers={
"X-Xybern-API-Key": "xb_live_...",
"X-Xybern-Dry-Run": "true", # observe only — no enforcement
},
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello"}],
)
In dry-run mode the enforcement result is appended to the response as a xybern_dry_run field, you can inspect what decision would have been taken without blocking or escalating the request.