---
schema_version: "1"
id: 9ac1d9801d3b7c0d373776ababaa3bee186c6e7bba988c093570a09b12d43a9b
title: Applying Model Proxy Policies
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/general/model-proxy-policies.md
canonical_url: https://docs.mulesoft.com/general/model-proxy-policies
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 66687197d3c21dae0e2759a53939cfacc2f1ce084fe61689c74cc86ba1083a04
description: MuleSoft Documentation Site
latest: true
---
---
product: Getting Started
---

# Applying Model Proxy Policies

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Model Proxy enforces three policies by default to secure and route LLM traffic without additional
configuration. Apply additional supported policies through API Manager to add content safety, PII
detection, and token rate limiting controls. Outbound policies and the Rate Limiting SLA policy are
not supported.

By default, Model Proxy applies these policies:

- Client ID Enforcement

- Model Proxy Core Policy

- Model Based Routing Policy or Semantic Routing Policy (policy name dependent on embedded service
  provider)

You don’t need to modify these policies.

> [!NOTE] Automate model proxy policy management using the MuleSoft MCP Platform Server. For
> details, see
> [apply\_policy\_to\_instance](https://docs.mulesoft.com/mulesoft-mcp-server/reference-mcp-tools-platform#apply-policy-to-instance)
> and related Policy Management tools in the MuleSoft MCP Platform Server Tool Reference.

Model Proxy supports most [included policies](https://docs.mulesoft.com/gateway/latest/policies-included-directory), but
doesn’t support outbound policies.

> [!NOTE] Model Proxy doesn’t support
> [Rate Limiting: SLA-Based Policy](https://docs.mulesoft.com/gateway/latest/policies-included-rate-limiting-sla).

These policies are specific and useful for Model Proxies:

- [Amazon Bedrock Guardrails Policy](https://docs.mulesoft.com/gateway/latest/policies-included-bedrock-guardrails)

- [Azure Content Safety Policy](https://docs.mulesoft.com/gateway/latest/policies-included-azure-content-safety)

- [LLM PII Detection Policy](https://docs.mulesoft.com/gateway/latest/policies-included-llm-pii-detection)

- [Model Proxy Request Compression Policy](https://docs.mulesoft.com/gateway/latest/policies-included-llm-proxy-request-compression)

- [LLM Token Based Rate Limit Policy](https://docs.mulesoft.com/gateway/latest/policies-included-llm-token-rate-limit)

- [Regex Prompt Guard Policy](https://docs.mulesoft.com/gateway/latest/policies-included-regex-prompt-guard)

## Apply Policies to Model Proxies

1.  From API Manager, click **Model Proxies**.

2.  Click the name of the Model Proxy you want to apply a policy to.

3.  Click **AI Policies**.

4.  Click **Add inbound policy**.

5.  Select the policy to apply.

6.  Configure the required parameters.

    For policy configuration parameters, see
    [Inbound Policies Directory](https://docs.mulesoft.com/gateway/latest/policies-included-directory).

7.  If necessary, configure **Advanced options**.

8.  Click **Apply**.

## Model Proxy Authentication Policy

By default, the Model Proxy has the Client ID Enforcement policy applied. This is required because
the Client ID Enforcement populates the `Authentication.clientName` variable in the `Authentication`
object that is used as a unique identifier for LLM Metrics.

To remove the Client ID Enforcement policy, ensure that you either:

- Apply a policy that populates `Authentication.clientName`:

  - [Client ID Enforcement Policy](https://docs.mulesoft.com/gateway/latest/policies-included-client-id-enforcement)

  - [Rate Limiting: SLA-Based Policy](https://docs.mulesoft.com/gateway/latest/policies-included-rate-limiting-sla)

  - [OAuth 2.0 Token Introspection Policy](https://docs.mulesoft.com/gateway/latest/policies-included-oauth-token-introspection)
    (If Client ID enforcement is configured, `skipClientIdValidation=false`)

  - [OpenID Connect OAuth 2.0 Token Enforcement Policy](https://docs.mulesoft.com/gateway/latest/policies-included-openid-token-enforcement)
    (If Client ID enforcement is configured, `skipClientIdValidation=false`)

  - [JWT Validation Policy](https://docs.mulesoft.com/gateway/latest/policies-included-jwt-validation) (If Client ID
    enforcement is configured, `skipClientIdValidation=false`)

  - A custom policy that populates `Authentication.clientName`

- Edit the DataWeave variable in Model Proxy Core to extract a different unique identifier, such as
  `clientid`, `userid`, or `departmentid`.

  > [!NOTE] You can’t filter by this unique identifier in Usage Reports.

## See Also

- [Securing Omni Gateway Instances with Policies](https://docs.mulesoft.com/gateway/latest/gateway-secure-apis)

- [Inbound Policies Directory](https://docs.mulesoft.com/gateway/latest/policies-included-directory)
