Can an AI Firewall Be Used with Any AI Model? How to Assess Its Coverage

Yuta Matsuyama

Security Researcher, TECHFUND Inc.

Updated:

Who this is for: AI application developers and security teams

The practical answer

When deploying an AI firewall, checking only whether it supports the model you currently use can leave some of the paths you want to protect uncovered. Even a product that works regardless of the model may actually inspect only requests that arrive in a particular format. The bottom line is that compatibility between an AI firewall and a model depends on the product and how it is connected. If the system inspects application inputs before they reach the model, you may be able to keep using it in the same place after switching models. With features integrated into model calls, however, availability varies by provider, model ID, and API.

What to check first

Check these points in order: ① where inspection is placed, ② what it can inspect, and ③ what happens after detection. The comparison below is based on official documentation as of November 13, 2026. Specifications and pricing terms can change, so check the latest information before deployment.

Cloudflare's “Firewall for AI” Is Model-Agnostic, but There Are Conditions on Which Inputs It Can Inspect

If the name you searched for refers to Cloudflare's product, first note the naming. Cloudflare's AI Security for Apps was previously called “Firewall for AI.” The official documentation explains that detection does not depend on the LLM being used.

However, according to the same documentation, inspection covers incoming requests to endpoints labeled cf-llm, and current detection handles the application/json format. To block requests or issue challenges based on detection results for prompt injection and other threats, you need to configure WAF rules. AI detection fields are a paid add-on for Enterprise, and availability must be confirmed with the provider.

In other words, not depending on the model name is different from automatically inspecting images, documents, model responses, and paths within the application. First check whether your inputs pass through the inspection scope.

Note that AI Gateway Guardrails, though also offered by Cloudflare, is a separate feature. The official documentation states that when the model type is unknown, only the input is evaluated, and response evaluation is skipped. Simply being able to connect to the gateway does not necessarily mean that responses are inspected as well.

What “Supported” Means Depends on the Connection Method

For example, the list of models supported by Amazon Bedrock Guardrails includes models for which guardrails cannot be specified directly in inference calls. It explains that specifying guardrails for an unsupported model results in a validation error. Meanwhile, ApplyGuardrail is an API that can independently inspect text supplied by an application without calling a model.

Even under the same product name, “model support” means different things for direct inference-time integration and a separate API. A separate API can be used in an architecture where the application passes another model's inputs and outputs for inspection, but you must implement both the process that sends the material to be inspected and the process that uses the results. A description of a product as model-agnostic alone does not establish that all information, including images and audio, will be inspected.

The NVIDIA NeMo Guardrails support list covers multiple providers and self-hosted models. However, connection methods and whether additional libraries are required vary by provider. The reliable approach is to choose the model and API format you will operate, then check that specific combination.

Connection methods and checks
Connection methodWhat to checkExample
Inspect at the application's entry pointTarget URLs, request formats, and fields to inspect. Whether internally retrieved documents and responses pass through itCloudflare AI Security for Apps
Integrate into model callsModel IDs, APIs, regions, and features that support input and outputInference-time integration of Amazon Bedrock Guardrails
Call a separate inspection APIWhat the application sends and when, and how it handles the verdict. Information that is not sent is not inspectedAmazon Bedrock's ApplyGuardrail
Embed a library in the applicationSupported providers, adapters, differences between features, and your own operational responsibilitiesNVIDIA NeMo Guardrails

Map the Information Flow Before Focusing on the Model

For example, consider an AI assistant that searches internal documents to answer questions.

Even if an entry-point firewall checks users' questions, documents brought in after a search and data returned by external tools may not pass through that entry point. Regarding indirect prompt injection through instructions embedded in documents, OWASP's explanation also identifies external documents as an attack path. The Amazon Bedrock Knowledge Bases documentation also explicitly states that guardrails are not applied to reference materials retrieved at runtime.

During evaluation, distinguish at least between questions, retrieved documents, tool arguments and results, and model answers, and write down which controls inspect which points. If you handle images or audio, also check whether each format is actually covered by the policies in use. When you change the connected model, retest whether the same paths and controls remain in place.

Example information flow
User question → Input inspection → Search → Retrieved documents → Model → Output inspection → Answer
External tool results → Model (when needed)

Test Detection and Blocking, Languages, and Failure Behavior

“Can detect” and “automatically blocks” are not the same. Microsoft Prompt Shields detects attack patterns in user inputs and supplied documents. With the Azure AI Content Safety API, however, the application decides what to do after detection, such as allowing or blocking the content. The absence of a detected attack also does not guarantee that the content is safe.

In pre-deployment tests, submit both ordinary questions in the languages you use and attack examples prepared within an authorized scope. Check whether they passed through inspection, whether legitimate inputs were incorrectly blocked, and whether post-detection handling worked as expected. Especially for languages other than English, such as Japanese, check not only the languages supported by each feature but also its behavior on actual inputs. Microsoft also recommends evaluating Prompt Shields in each language used.

Also decide whether to allow or stop traffic if the inspection service times out, whether streaming could expose some content before inspection, and how to avoid leaving sensitive information in logs. Rather than relying on inspection alone, the design needs to minimize permissions for functions the model can call and require separate approval for important operations.

Common questions

Does protection continue after changing models?

Check the endpoint, format and paths, then retest detection and enforcement.

Is content safe if no attack is detected?

No. Checks can miss attacks or paths; restrict permissions and require human approval where appropriate.

How Hi AUDIT Agent can help

If, in addition to inspecting live inputs and outputs, you also want to review permission checks and input handling in your application's code, you can use Hi AUDIT Agent from your development environment. Through MCP, you can request code analysis and review detected locations and proposed fixes. Analysis results are material for review; people decide whether to apply the changes. It does not replace an AI firewall operating on live traffic.

Create a Hi AUDIT Agent account