Decision Tracing
Use this flow when debugging unexpected rejects.
Step 1: Capture reject headers
curl -i -X POST http://localhost:8080/v1/decision \
-H 'X-Original-Method: POST' \
-H 'X-Original-URI: /v1/chat/completions'
Collect:
X-Fairvisor-ReasonRetry-AfterRateLimit-*
If you need policy/rule attribution, enable a debug session and inspect:
X-Fairvisor-Debug-PolicyX-Fairvisor-Debug-Rule
Step 2: Map reason -> limiter class
token_bucket_exceeded->token_bucketbudget_exceeded->cost_basedtpm_exceeded/tpd_exceeded->token_bucket_llmkill_switch-> kill switch pre-checkloop_detected/circuit_breaker_open-> advanced policy blocks
Step 3: Verify request context
In decision_service mode ensure gateway forwarded:
X-Original-MethodX-Original-URI- identity headers/JWT used in descriptors
Step 4: Check descriptor availability
If keys are missing, inspect:
rate(fairvisor_descriptor_missing_total[5m])
Step 5: Confirm policy/rule intent
- Review selector match and method filters
- Validate rule
limit_keys, algorithm, and config - Validate fallback behavior and shadow mode