Baltor Get started

Models

gpt-oss-safeguard-20b

By OpenAI. 21.5 billion parameters, a context window of 131,072 tokens and the licence apache-2.0.

Facts

Released
2025-09-18 the day the repository was first published on Hugging Face Hugging Face, read
Licence
apache-2.0 the licence the model card declares Hugging Face, read
Open weights
Yes the weights are published in this Hugging Face repository Hugging Face, read
Parameters
21.5 billion counted from the safetensors weight files Hugging Face, read
Active parameters
4.8 billion estimate estimated from the expert counts and sizes in the configuration model configuration, read
Knowledge cutoff
Unknown
Context window
  • 131,072 tokens the maximum position embeddings in the model configuration model configuration, read
  • 131,072 tokens the context length OpenRouter lists OpenRouter, read
Longest output
  • 65,536 tokens the largest output OpenRouter's first provider allows OpenRouter, read
Tool calling
  • Yes OpenRouter lists tools among the supported parameters OpenRouter, read
Structured output
  • Yes OpenRouter lists structured outputs among the supported parameters OpenRouter, read
Reasoning controls
  • Yes OpenRouter lists reasoning controls OpenRouter, read
Inputs and outputs
text in, text out Hugging Face, read
Good for
  • Reasoning: OpenRouter lists reasoning controls for it OpenRouter, read

Prices

Prices in US dollars per million tokens, as each source lists them
ProviderInputOutputContextAs ofSource
Merge Gateway direct0.070 USD0.200 USD4,096 older than 30 days; check the providermodels.dev, read
Vercel AI Gateway direct0.070 USD0.200 USD128,000 older than 30 days; check the providermodels.dev, read
Groq direct0.075 USD0.300 USD131,072 older than 30 days; check the providermodels.dev, read
Groq through OpenRouter0.075 USD0.300 USD131,072OpenRouter endpoints, read
Kilo Gateway direct0.075 USD0.300 USD131,072 older than 30 days; check the providermodels.dev, read
NanoGPT direct0.075 USD0.300 USD128,000 older than 30 days; check the providermodels.dev, read
OpenRouter direct0.075 USD0.300 USD131,072 older than 30 days; check the providermodels.dev, read

Run it on your own hardware

Weights are the sizes of the files a source lists, or an estimate from the parameter count where none does. Memory is an estimate: weights plus KV cache plus 512 MiB and 5 percent of the weights for runtime buffers. Check it against your hardware.

QuantizationWeightsMemory at 8,192 tokensMemory at 32,768 tokens
Q3_K_S10.7 GiB12.1 GiB13.2 GiB
Q4_010.7 GiB12.1 GiB13.2 GiB
Q3_K_M10.7 GiB12.1 GiB13.3 GiB
Q4_110.8 GiB12.2 GiB13.3 GiB
Q4_K_S10.8 GiB12.2 GiB13.4 GiB
Q4_K_M10.8 GiB12.2 GiB13.4 GiB
UD-Q4_K_XL11.1 GiB12.5 GiB13.6 GiB

Start it with a local runtime

  • Ollama
    ollama run hf.co/unsloth/gpt-oss-safeguard-20b-GGUF:Q4_0
  • LM Studio
    lms get unsloth/gpt-oss-safeguard-20b-GGUF
    lms server start
  • llama.cpp server
    llama-server -hf unsloth/gpt-oss-safeguard-20b-GGUF:Q4_0 --jinja
  • vLLM
    vllm serve openai/gpt-oss-safeguard-20b
  • SGLang
    sglang serve --model-path openai/gpt-oss-safeguard-20b --port 30000

Use it from your harness

Set up for Groq with the model openai/gpt-oss-safeguard-20b. Each endpoint page has the same setup for its own address.

OpenCode

Put this in opencode.json in your project folder:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "groq": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Groq",
      "options": {
        "baseURL": "https://api.groq.com/openai/v1",
        "apiKey": "{env:GROQ_API_KEY}"
      },
      "models": {
        "openai/gpt-oss-safeguard-20b": {
          "name": "gpt-oss-safeguard-20b",
          "limit": {
            "context": 131072,
            "output": 65536
          }
        }
      }
    }
  }
}
  • OpenCode reads any OpenAI-compatible address through the @ai-sdk/openai-compatible package, and an address that speaks the Responses API through @ai-sdk/openai.

From OpenCode documentation, read .

Pi

Put this in ~/.pi/agent/models.json:

{
  "providers": {
    "groq": {
      "baseUrl": "https://api.groq.com/openai/v1",
      "api": "openai-completions",
      "apiKey": "$GROQ_API_KEY",
      "models": [
        {
          "id": "openai/gpt-oss-safeguard-20b"
        }
      ]
    }
  }
}
  • The apiKey field can name an environment variable as $NAME.

From Pi documentation, read .

Codex

Put this in ~/.codex/config.toml:

model = "openai/gpt-oss-safeguard-20b"
model_provider = "groq"

[model_providers.groq]
name = "Groq"
base_url = "https://api.groq.com/openai/v1"
env_key = "GROQ_API_KEY"
  • Codex speaks the Responses API only: responses is the one supported wire API of a custom provider. Ollama and LM Studio are built in and start with --oss.

From Codex documentation, read .

Claude Code

Claude Code sends Anthropic Messages requests, and Groq documents no such address. A gateway that translates to that API can sit in between.

  • Claude Code sends Anthropic Messages requests to ANTHROPIC_BASE_URL. Anthropic says it does not support routing Claude Code to models other than Claude through any gateway, so some features may not work with another model.

From Claude Code documentation, read .

Other ways to reach it

  • Kilo Gateway, model openai/gpt-oss-safeguard-20b
  • NanoGPT, model openai/gpt-oss-safeguard-20b
  • OpenRouter, model openai/gpt-oss-safeguard-20b
  • Ollama, model hf.co/unsloth/gpt-oss-safeguard-20b-GGUF:Q4_0

Published results

These are results other people published. Baltor did not run them and does not rank models by them.