Strix is an open-source AI pentest agent, and it does not care which provider serves its model, as long as LiteLLM can reach it. To run Strix with an OpenAI-compatible API, you set four environment variables: STRIX_LLM with an openai/ model prefix, LLM_API_KEY, LLM_API_BASE, and STRIX_API_TYPE=chat_completions. This guide covers that Strix OpenAI-compatible API setup end to end with RedRouter as the endpoint, plus the parts most short recipes skip: pricing a custom model so --max-budget works, keeping scans in scope, and running Strix in CI.
If you only need the short env-var block next to other clients, our OpenAI-compatible API guide for security agents has it. This post is about Strix itself. Short version in the docs.
Use Strix only on systems you own, isolated labs, or targets you have written authorization to test, such as a signed engagement scope or an in-scope bug bounty or VDP asset. Strix sends real attack traffic. Our terms prohibit unauthorized testing, and pointing an agent at a target does not create permission.
What Strix is
According to the Strix repository (checked November 12, 2026), Strix is an Apache-2.0 "open-source AI penetration testing tool to find and fix your app's vulnerabilities." It has more than 75,000 GitHub stars, and the latest release is v1.7.1, published November 10, 2026.
The Strix quick start lists two prerequisites: a running Docker install and an LLM API key. The source install below also needs Git, uv and Go 1.24 or newer. Strix pulls its sandbox image on the first run and writes results to strix_runs/<run-name>. It accepts a local codebase, a GitHub repository, a live web application, several targets at once for white-box testing, or a target list file.
Two details matter before you run it against anything:
- Tools run in a Docker sandbox. The configuration reference sets the default sandbox image to
ghcr.io/usestrix/strix-sandbox:1.4.1, overridable withSTRIX_IMAGE. - A local directory target is mounted live and writable. The CLI reference says the agent edits your real files (except
.git), so commit or stash first.
How Strix picks its model
Strix routes model calls through LiteLLM, so STRIX_LLM takes a LiteLLM provider/model name. For a generic OpenAI-compatible API, the provider prefix is openai/ and the rest is the model ID your endpoint expects. The Strix configuration docs define the settings that matter:
| Variable | What it does |
|---|---|
STRIX_LLM | Required. Model name in LiteLLM format, such as openai/<model-id> |
LLM_API_KEY | Your provider key, sent as a bearer token |
LLM_API_BASE | Custom API base URL. Also accepts OPENAI_API_BASE, LITELLM_BASE_URL or OLLAMA_API_BASE |
STRIX_API_TYPE | responses or chat_completions. Picks the OpenAI API path |
LLM_EXTRA_BODY | JSON fields merged into every request body |
LLM_EXTRA_HEADERS | JSON headers sent on every request, for gateways that need them |
STRIX_LLM_INPUT_COST_PER_MTOK and friends | Prices for models LiteLLM can't price |
The one that trips people up is STRIX_API_TYPE. By default Strix uses the Responses API when LiteLLM's catalog lists /v1/responses for the model, and Chat Completions otherwise. The docs are explicit that a custom LLM_API_BASE does not change this, so the safe move with any gateway is to set the API type yourself.
Strix OpenAI-compatible API setup with RedRouter
RedRouter serves Chat Completions, Responses and Anthropic Messages, and its compatibility guide gives https://redrouter.org/v1 as the OpenAI-compatible base URL. Strix's LiteLLM path appends /chat/completions to it. If you have never sent a RedRouter request, the API quickstart gets you a key and a first call.
export STRIX_LLM=openai/glm-5.3-flash-red
export LLM_API_KEY="$REDROUTER_API_KEY"
export LLM_API_BASE=https://redrouter.org/v1
export STRIX_API_TYPE=chat_completions
export STRIX_IMAGE=ghcr.io/usestrix/strix-sandbox@sha256:c8e70302ba4a69b678b4001c909b134d8d0b84625d7b23feed59ece02672c1d2
# Price the custom model so reports and --max-budget are accurate (USD per 1M tokens)
export STRIX_LLM_INPUT_COST_PER_MTOK=0.25
export STRIX_LLM_CACHED_INPUT_COST_PER_MTOK=0.10
export STRIX_LLM_OUTPUT_COST_PER_MTOK=1.00
# Optional: turn off Strix telemetry (PostHog, Scarf, OTEL)
export STRIX_TELEMETRY=0
Then run a short, scoped scan against a lab target first:
uvx --python 3.12.14 --from git+https://github.com/usestrix/strix.git@685bbc8138d35fc9fe378ac37ec0d9198b9c46a3 \
strix -n --target http://127.0.0.1:3000 --scan-mode quick \
--max-budget 2 --max-turns 50 \
--instruction-file ./scope.txt
A few notes on the choices above:
- Model ID. Use the exact ID from RedRouter's model catalog or
GET /v1/models, with Strix'sopenai/prefix in front. Pick a model whose catalog entry shows tool calling; Strix is an agent and depends on it. - Chat Completions. RedRouter's own pinned Strix check (below) used Chat Completions, and LiteLLM's catalog won't list a RedRouter model ID anyway. Setting it explicitly removes the guesswork.
- Config file instead of env vars. Strix also reads
~/.strix/cli-config.jsonwith the same keys inside an"env"object, or a custom file passed with--config.
What RedRouter has actually tested
RedRouter's security agents page records a short compatibility check of Strix 1.7.0 (revision 6b7ae2eb) on October 29, 2026, through a local RedRouter build against an OWASP Juice Shop fixture. It is a compatibility check, not a full assessment or a test of the production endpoint, and it used deepseek-v4.1-flash-red, not the model above. That recipe adds a few more settings:
export STRIX_REASONING_EFFORT=none
export LLM_EXTRA_BODY='{"max_tokens":8192}'
export STRIX_MAX_CONTEXT_IMAGES=0
Why they help: RedRouter accepts reasoning-effort fields and ignores them, so none avoids sending a setting that does nothing. Many catalog models default to 1,024 output tokens when no limit is sent, which cuts agent turns short; max_tokens of 8,192 matches the per-request cap for most models. GLM 5.3 Flash Red already defaults to 8,192 output tokens, so that line is optional for it. RedRouter's text-only models can't read screenshots, so the recipe keeps image context at zero. STRIX_MAX_CONTEXT_IMAGES comes from that pinned recipe and isn't listed in Strix's current configuration reference, so confirm it against your installed version.
In the first run on 2026-11-15, the Action ran Strix 1.7.1 with red-cyber-1 on code only; Strix's report called the review incomplete at the budget cap (run details). Other models and plain-Strix web-app scans with RedRouter models have not been run with 1.7.1.
Make --max-budget work with a custom model
--max-budget caps total LLM spend in USD across the root agent and every sub-agent. In headless mode (-n) the scan stops cleanly when spend reaches the cap; sub-agents stop at 90% so the root agent can write the final report. In interactive mode it pauses instead (CLI reference).
The catch is that the cap is only as good as the cost estimate. LiteLLM has no price for a model ID like openai/glm-5.3-flash-red, so the configuration docs provide STRIX_LLM_INPUT_COST_PER_MTOK, STRIX_LLM_OUTPUT_COST_PER_MTOK and STRIX_LLM_CACHED_INPUT_COST_PER_MTOK for "gateway or self-hosted model ids that LiteLLM can't price." Two rules from those docs:
- Set both input and output. If you set any price, an unset input or output price counts as 0.
- Cached input falls back to the input price when you leave it unset, which over-counts but never under-counts.
Strix also notes that the check runs after each response, so the final spend can overshoot slightly while concurrent sub-agent calls are in flight. Set the cap a little below your real limit.
For RedRouter, use the live numbers from the model page. GLM 5.3 Flash Red (glm-5.3-flash-red) costs $0.25 per 1M input tokens, $0.10 per 1M cached input tokens and $1.00 per 1M output tokens, with a 1,048,576-token context window and tool calling (model page, pricing). red-cyber-1 (Beta), the featured model for authorized pentesting, costs $0.28, $0.10 and $1.10 per 1M tokens on the same basis (model page); it was not part of RedRouter's earlier 1.7.0 check. Prices change, so copy them from docs.redrouter.org/models when you set the variables.
The deduplication model
Strix runs a separate step that decides whether a new finding duplicates an existing one. By default it uses STRIX_LLM. You can point it elsewhere with STRIX_DEDUPE_MODEL, plus DEDUPE_LLM_API_KEY and DEDUPE_LLM_API_BASE if it lives on another endpoint. A dedicated dedupe model does not inherit LLM_EXTRA_HEADERS or LLM_EXTRA_BODY, and it keeps its LiteLLM price rather than your custom STRIX_LLM_* prices (configuration). If you route dedupe to a custom ID too, set its own extra body if you need it, and expect its cost to be under-counted.
Keep Strix scans in scope
Strix's scan scope is whatever you pass as targets, plus whatever the model decides to touch from there. Three habits keep that tight:
- Write the scope down and pass it.
--instructionor--instruction-filetakes free-text rules. RedRouter's pinned recipe uses a scope like: assess only the named source and URL, never contact other systems including links found in source, and report evidence and uncertainty. - Cap the run. Use
--max-turns(default 500 per agent) and--max-budgeton every first run against a new target. - Pick the right scan mode. The scan modes page describes quick (minutes, for CI), standard (30 minutes to an hour) and deep (1 to 4 hours, and the default). Deep is not what you want for a first test of a new endpoint.
For bug bounty work, read the program's rules on automated scanning before you start. Many programs limit request rates or ban automated tools on some assets, and an in-scope domain does not override those rules. Our AI bug bounty workflow covers how to keep an AI-assisted hunt inside a program's policy.
Run Strix in CI with a custom endpoint
The scope builder writes the RedRouter Security Action workflow and .github/scope.yaml; the steps below are the plain-Strix alternative.
The GitHub Actions guide installs Strix in a job and runs strix -n -t ./ --scan-mode quick, with exit code 2 when it reports findings. Its example only sets STRIX_LLM and LLM_API_KEY, so for a custom endpoint you add the base URL, API type and prices:
- name: Set up uv (pinned)
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
version: "0.13.8"
python-version: "3.12.14"
- name: Run Security Scan
env:
STRIX_LLM: openai/glm-5.3-flash-red
LLM_API_KEY: ${{ secrets.REDROUTER_API_KEY }}
LLM_API_BASE: https://redrouter.org/v1
STRIX_API_TYPE: chat_completions
STRIX_IMAGE: ghcr.io/usestrix/strix-sandbox@sha256:c8e70302ba4a69b678b4001c909b134d8d0b84625d7b23feed59ece02672c1d2
STRIX_LLM_INPUT_COST_PER_MTOK: "0.25"
STRIX_LLM_CACHED_INPUT_COST_PER_MTOK: "0.10"
STRIX_LLM_OUTPUT_COST_PER_MTOK: "1.00"
run: |
uvx --from git+https://github.com/usestrix/strix.git@685bbc8138d35fc9fe378ac37ec0d9198b9c46a3 \
strix -n -t ./ --scan-mode quick --fail-on high --max-budget 5
--fail-on high fails the job only on high or critical findings, while lower findings still appear in the report. On pull requests Strix scans only changed files by default in CI, so keep fetch-depth: 0 on checkout or set --diff-base. Scan your own repository here, not third-party code.
Common Strix errors with a custom endpoint
| Symptom | Likely cause | Fix |
|---|---|---|
LLM CONNECTION FAILED at startup | Wrong base URL, key or model ID, or a slow first response | Check LLM_API_BASE is https://redrouter.org/v1 and the ID exists; raise LLM_PREFLIGHT_TIMEOUT (default 30 seconds) only if the endpoint is reachable |
| 404 | /v1 missing or doubled in the final path, or a wrong model ID | Base URL with /v1 exactly once (troubleshooting) |
| 400 on every request | A field in LLM_EXTRA_BODY the endpoint doesn't accept | RedRouter returns 400 for unknown request parameters; remove the field |
| Agent turns stop mid-thought | Default output limit too low for the model | Send max_tokens up to 8,192 through LLM_EXTRA_BODY, or use a model that already defaults to 8,192 |
--max-budget never triggers | LiteLLM can't price the model, so cost reads near zero | Set all three STRIX_LLM_*_COST_PER_MTOK variables |
| Requests go to the Responses path | Model ID matches a LiteLLM entry that lists /v1/responses | Set STRIX_API_TYPE=chat_completions |
What happens to scan data
Strix sends target responses, source snippets and tool output to the model on every turn, and that can include credentials and customer data. Decide on retention before the first scan. Each RedRouter API key has a store_content setting, and new keys default to storage off. Account-wide zero data retention (ZDR) is a separate opt-in setting that is off by default; the data handling docs cover what it does and who is eligible, and what RedRouter keeps explains it in plain terms. Strix also writes full local run telemetry to strix_runs/<run_name>/events.jsonl, which none of RedRouter's settings touch, so clean those files up under your engagement's data rules.
Other frameworks on the same endpoint
The same base URL works for other agents, with different config surfaces. See ARTEX with RedRouter and PentAGI with an OpenAI-compatible API. For what the RedRouter API is and who it's for, see the inference API page, and for how we think about security work in general, see security.
FAQ
Does Strix work with any OpenAI-compatible API?
It works with endpoints LiteLLM can call. Use the openai/ prefix in STRIX_LLM, set LLM_API_BASE to the endpoint's /v1 base URL, and set STRIX_API_TYPE=chat_completions if the endpoint serves only Chat Completions. The model must support tool calling for Strix's agents to work.
What is the difference between LLM_API_BASE and OPENAI_API_BASE in Strix?
Strix's configuration docs say LLM_API_BASE also accepts OPENAI_API_BASE, LITELLM_BASE_URL or OLLAMA_API_BASE. Set one. LLM_API_BASE is the name Strix documents first.
Why does Strix need prices for a custom model?
LiteLLM can't price model IDs it doesn't know, so reports and --max-budget would read near zero. The STRIX_LLM_INPUT_COST_PER_MTOK, STRIX_LLM_OUTPUT_COST_PER_MTOK and STRIX_LLM_CACHED_INPUT_COST_PER_MTOK variables fix that. Set both input and output.
Which RedRouter model should I use with Strix?
Any catalog model with tool calling. GLM 5.3 Flash Red ($0.25 input, $0.10 cached, $1.00 output per 1M tokens) defaults to 8,192 output tokens, which suits long agent loops. red-cyber-1 (Beta) is the featured model for authorized pentesting. The first 2026-11-15 Action run used Strix 1.7.1 with red-cyber-1 on code only, and Strix's report called the review incomplete at the budget cap; run your own short lab scan first.
Can I run Strix against a bug bounty target?
Only against assets that are in the program's published scope, and only if the program allows automated testing on them. Read the rate limits and tool rules first, pass the scope to Strix with --instruction-file, and cap the run with --max-turns and --max-budget.
Sources
- Strix: repository, v1.7.1 release, quick start, configuration, CLI reference, scan modes, GitHub Actions, local and OpenAI-compatible models. Checked November 12, 2026.
- RedRouter Docs: Compatibility, Security agents, Models and pricing, Troubleshooting, Data handling. Checked November 12, 2026.