> This page is for NeMo Relay, version v1.0.0.
> For other versions, use one of these documentation indexes:
> - Latest (v0.11.2) (default): https://docs.nvidia.com/nemo/relay/latest/llms.txt
> - dev: https://docs.nvidia.com/nemo/relay/dev/llms.txt
> - v1.0.0: https://docs.nvidia.com/nemo/relay/v1.0.0/llms.txt
> - v0.11.2: https://docs.nvidia.com/nemo/relay/v0.11.2/llms.txt
> - v0.10.4: https://docs.nvidia.com/nemo/relay/v0.10.4/llms.txt
> - v0.9.4: https://docs.nvidia.com/nemo/relay/v0.9.4/llms.txt
> - v0.8.4: https://docs.nvidia.com/nemo/relay/v0.8.4/llms.txt

> For clean Markdown of any page, append .md to the page URL. For a task-oriented documentation index, fetch https://docs.nvidia.com/nemo/relay/llms.txt. Use the documentation version matching the installed NeMo Relay package: latest follows the latest stable release, vX.Y.Z identifies a retained release snapshot, and dev documents development changes. Preserve the selected version when following links; do not mix examples or API contracts from different versions. Fetch the relevant section's /llms.txt before individual pages instead of loading a complete version index.

# PII Redaction Helpers

> PII redaction plugin configuration helpers.

Generated from `crates/node/dist/pii_redaction.d.ts`.

Import from `nemo-relay-node/pii_redaction`.

PII redaction plugin configuration helpers.

## Interfaces

### `ConfigPolicy`

```ts
export interface ConfigPolicy {
    unknown_component?: 'ignore' | 'warn' | 'error' | (string & {});
    unknown_field?: 'ignore' | 'warn' | 'error' | (string & {});
    unsupported_value?: 'ignore' | 'warn' | 'error' | (string & {});
}
```

### `BuiltinConfig`

```ts
export interface BuiltinConfig {
    preset?: 'trajectory_context';
    action?: 'remove' | 'redact' | 'regex_replace' | 'hash' | 'mask' | (string & {});
    target_paths?: string[];
    target_path_globs?: string[];
    pattern?: string;
    detector?: string;
    replacement?: string;
    mask_char?: string;
    unmasked_prefix?: number;
    unmasked_suffix?: number;
    custom_mark_payload_policy?: 'preserve' | 'redact_all_leaves';
    metric_string_attribute_allowlist?: Record<string, string[]>;
}
```

### `LocalModelConfig`

```ts
export interface LocalModelConfig {
    backend?: string;
    model_id?: string;
    detector_profile?: string;
    allow_network?: boolean;
    max_latency_ms?: number;
}
```

### `Config`

```ts
export interface Config {
    version?: number;
    mode?: 'builtin' | 'local_model' | (string & {});
    input?: boolean;
    output?: boolean;
    tool_input?: boolean;
    tool_output?: boolean;
    mark?: boolean;
    priority?: number;
    codec?: 'openai_chat' | 'openai_responses' | 'anthropic_messages' | 'oci_genai' | 'gemini_generate_content' | (string & {});
    builtin?: BuiltinConfig;
    local?: LocalModelConfig;
    policy?: ConfigPolicy;
}
```

### `ComponentSpec` interface

```ts
export interface ComponentSpec {
    kind: 'pii_redaction';
    enabled?: boolean;
    config: Config;
}
```

## Functions

### `defaultConfig`

Creates a default PII redaction config.

```ts
export declare function defaultConfig(): Config;
```

### `builtinConfig`

Creates built-in backend settings with defaults applied.

```ts
export declare function builtinConfig(config?: BuiltinConfig): BuiltinConfig;
```

### `localModelConfig`

Creates local-model backend settings with defaults applied.

```ts
export declare function localModelConfig(config?: LocalModelConfig): LocalModelConfig;
```

### `ComponentSpec` function

Wraps PII redaction config as a plugin component.

```ts
export declare function ComponentSpec(config: Config, { enabled }?: {
    enabled?: boolean;
}): ComponentSpec;
```

## Constants

### `PII_REDACTION_PLUGIN_KIND`

Plugin kind of the PII redaction component.

```ts
export declare const PII_REDACTION_PLUGIN_KIND = "pii_redaction";
```

## Re-exports

* `ConfigDiagnostic`
* `ConfigReport`