LLM firewalls & guardrails

OpenAI gpt-oss-safeguard: open-weight policy-following safety model family

gpt-oss-safeguard is an open-weight policy-following safety model family from OpenAI. It is open source under the Apache-2.0 license and is offered as: Self-hosted, Library.

  • Last reviewed
Open sourceApache-2.0 Layer 6: Runtime guardrails

Best for

  • Trust and safety teams that want to run an open model against their own written policy, and can afford the extra compute and latency of a reasoning model
  • Teams whose rules change often, such as a new spam or teen safety policy, and who want to edit a policy document instead of retraining a classifier

Consider instead if

  • You need a small model with a fixed taxonomy, or token-level checks while a reply streams, more than a policy you write yourself. See Qwen3Guard.
  • You want a ready-made harm taxonomy that also checks groundedness and function calls. See Granite Guardian.

What gpt-oss-safeguard does

gpt-oss-safeguard is OpenAI's pair of open-weight reasoning models, 20B and 120B, trained to read a safety policy you wrote, decide whether a piece of content breaks it and show the reasoning. The categories come from your policy text, which is the main difference from qwen3guard and granite-guardian. OpenAI's technical report names the costs. Classifiers trained on tens of thousands of labeled examples can still beat it, and it is slow and compute heavy, so OpenAI puts smaller classifiers in front or runs it asynchronously. In the same report's chat tests, both sizes resisted prompt injection hijacking less well than base gpt-oss, so feed it hostile content in a test before relying on it. It needs the harmony format; the weights are Apache-2.0.

This summary is our own wording of the sourced facts on this page.

Key facts

Each value links to the page that states it, with the date we checked it.

Latest release
Not documented in the sources we checked
API reference
Not documented in the sources we checked
Security page
Not documented in the sources we checked
Attestations or disclosure
Not documented in the sources we checked

Capabilities

As documented by the vendor or project. The tag is our label from a controlled vocabulary.

Integrations

Where gpt-oss-safeguard fits in our AI security layers

Our analysis

Our editorial model, not a standard. The primary layer follows the category, except for tools whose main documented job is detection and response; other layers rest on a capability the sources document. How the model works.

AI security layers that gpt-oss-safeguard covers, with the role, how each applies and what it rests on
LayerRoleHow it appliesBased on
L6 Runtime Runtime guardrails Primary Screen what goes into and comes out of a model in live traffic, and limit abuse of the model endpoint. Follows its category, LLM firewalls & guardrails

OWASP LLM Top 10 mapping

Our analysis

The risk list is OWASP's (Top 10 for LLM Applications, 2025). The mapping is our analysis, and each row rests on a capability the sources document.

No OWASP LLM risk is mapped to this tool in our analysis.

Alternatives and related tools

More in LLM firewalls & guardrails, ranked within the category by Coverage Score.

Open sourceApache-2.0
  • Library
  • Self-hosted
  • API

Adds programmable input, dialog, retrieval, execution and output rails to LLM applications.

Best for: Teams that want to script rules for one LLM application in Python and run them in their own infrastructure

Coverage Score 76 out of 100
  • LLM01 Prompt Injection
  • LLM02 Sensitive Information Disclosure
  • LLM05 Improper Output Handling
  • LLM06 Excessive Agency

Reviewed

Portkey AI Gateway

Palo Alto Networks (Portkey)

Open sourceMIT Freemium Now Prisma AIRS AI Gateway
  • SaaS
  • Self-hosted
  • API

Routes LLM traffic through one gateway API and runs input and output guardrail checks on each request.

Best for: Teams that want a single gateway for several LLM providers with guardrail checks, available as open source or as a hosted service

Coverage Score 69 out of 100
  • LLM01 Prompt Injection
  • LLM02 Sensitive Information Disclosure
  • LLM05 Improper Output Handling
  • LLM09 Misinformation

Reviewed

Open sourceApache-2.0
  • Self-hosted
  • SaaS
  • API

Routes LLM traffic through Kong with prompt guards, PII sanitization, spend limits and observability.

Best for: Teams that already run Kong as an API gateway and want LLM routing and prompt controls on the same data plane

Coverage Score 65 out of 100
  • LLM01 Prompt Injection
  • LLM02 Sensitive Information Disclosure
  • LLM10 Unbounded Consumption

Reviewed

gpt-oss-safeguard FAQ

Is gpt-oss-safeguard open source?

The model card says Apache 2.0, and the weights are on Hugging Face. The code and example policies are in the openai/gpt-oss-safeguard repository.

How do I define what counts as unsafe?

You write your own policy and send it with the content to classify. The cookbook guide suggests about 400 to 600 tokens, and you can ask for a plain 0 or 1, or JSON with the rule IDs and a short rationale.

What are its limits?

OpenAI's technical report says classifiers trained on tens of thousands of labeled examples can still classify better, and that the models are time and compute intensive, so OpenAI uses smaller classifiers first or runs its own version asynchronously. The models only work correctly with the harmony response format.

How accurate is it?

In OpenAI's report the 120B model reaches 46.3% multi-policy accuracy and 82.9% F1 on OpenAI's 2022 moderation set. These are OpenAI's own figures on its policies, so they do not compare directly with Qwen3Guard's numbers on the same public sets.

Key facts you can cite

We have no commercial relationship with OpenAI.

Sources & last reviewed

Last reviewed . We compile from the vendors' own public pages and repositories and we do not run the products. Source links open in a new tab. Found a mistake? Report a correction.