PromptInjectionScanScope - TypeScript SDK

PromptInjectionScanScope type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Which message roles to scan for prompt injection. Only applies to the regex-prompt-injection builtin. Defaults to all_messages.

Example Usage

1import { PromptInjectionScanScope } from "@openrouter/sdk/models";
2
3let value: PromptInjectionScanScope = "user_only";
4
5// Open enum: unrecognized values are captured as Unrecognized<string>

Values

1"user_only" | "all_messages" | Unrecognized<string>