UpdateGuardrailRequest - TypeScript SDK
UpdateGuardrailRequest - TypeScript SDK
UpdateGuardrailRequest type definition
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.
Example Usage
1 import { UpdateGuardrailRequest } from "@openrouter/sdk/models"; 2 3 let value: UpdateGuardrailRequest = {};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
allowedModels | string[] | ➖ | Array of model identifiers (slug or canonical_slug accepted) | [ “openai/gpt-5.2” ] |
allowedProviders | string[] | ➖ | New list of allowed provider IDs | [ “openai”, “anthropic”, “deepseek” ] |
contentFilterBuiltins | models.ContentFilterBuiltinEntry[] | ➖ | Builtin content filters to apply. Set to null to remove. The “flag” action is only supported for “regex-prompt-injection”; PII slugs (email, phone, ssn, credit-card, ip-address, person-name, address) accept “block” or “redact” only. | [{"action": "block","slug": "regex-prompt-injection"}] |
contentFilters | models.ContentFilterEntry[] | ➖ | Custom regex content filters to apply. Set to null to remove. | <nil> |
description | string | ➖ | New description for the guardrail | Updated description |
enforceZdr | boolean | ➖ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. Deprecated. Use enforce_zdr_anthropic, enforce_zdr_openai, enforce_zdr_google, and enforce_zdr_other instead. When provided, its value is copied into any of those per-provider fields that are not explicitly specified on the request. | true |
enforceZdrAnthropic | boolean | ➖ | Whether to enforce zero data retention for Anthropic models. Falls back to enforce_zdr when not provided. | true |
enforceZdrGoogle | boolean | ➖ | Whether to enforce zero data retention for Google models. Falls back to enforce_zdr when not provided. | true |
enforceZdrOpenai | boolean | ➖ | Whether to enforce zero data retention for OpenAI models. Falls back to enforce_zdr when not provided. | true |
enforceZdrOther | boolean | ➖ | Whether to enforce zero data retention for models that are not from Anthropic, OpenAI, or Google. Falls back to enforce_zdr when not provided. | true |
ignoredModels | string[] | ➖ | Array of model identifiers to exclude from routing (slug or canonical_slug accepted) | [ “openai/gpt-4o-mini” ] |
ignoredProviders | string[] | ➖ | List of provider IDs to exclude from routing | [ “azure” ] |
limitUsd | number | ➖ | New spending limit in USD | 75 |
name | string | ➖ | New name for the guardrail | Updated Guardrail Name |
resetInterval | models.GuardrailInterval | ➖ | Interval at which the limit resets (daily, weekly, monthly) | monthly |