Contents
To run Promptfoo’s red-team attacker on SolCard Inference, set redteam.provider to openai:chat:solcard-inference-fast with apiBaseUrl: https://api.solcardinference.ai/v1 and your sk-si- key. That one block covers both attack generation and grading. Everything about Promptfoo below comes from its own docs; we haven’t run it ourselves.
Why the attacker model matters
Promptfoo needs a model willing to write adversarial test cases, and many models aren’t. Its remote generation troubleshooting page lists this as the first reason you get fewer tests than you asked for: “The configured redteam provider model is refusing to generate adversarial content. Some models have safety filters that block generation of harmful test cases.”
The configuration page adds a sharper warning: “Some providers such as Anthropic may disable your account for generating harmful test cases.”
Our three models are open models with their refusal training removed, and red-teaming and hardening safety classifiers are what they’re for. The attacker writes test inputs for your own app; your app, the target, stays wherever it runs now.
What you need
- A SolCard Inference API key from the dashboard’s API keys page. Keys start with
sk-si-and are shown once. - Some balance or a plan. One prepaid USD balance covers every key and model; see how billing works.
- Promptfoo. The red teaming guide starts a project with
npx promptfoo@latest redteam init my-redteam-project --no-gui.
export SOLCARD_INFERENCE_KEY=sk-si-...
The redteam.provider block
Promptfoo’s OpenAI provider page says to “set apiBaseUrl for an OpenAI-compatible gateway and apiKeyEnvar to select its credential.” In your promptfooconfig.yaml:
redteam:
provider:
id: openai:chat:solcard-inference-fast
config:
apiBaseUrl: https://api.solcardinference.ai/v1
apiKeyEnvar: SOLCARD_INFERENCE_KEY
max_tokens: 4096
Three details from that page:
apiBaseUrlends at/v1. The docs say it “includes the API prefix, such as/v1, but not/chat/completionsor/responses.”apiKeyEnvardoesn’t fall back. “A missing variable does not fall back toOPENAI_API_KEY,” so a typo fails instead of sending your OpenAI key to us.- Use the
openai:chat:prefix. The page saysopenai:chat:<model>selects Chat Completions explicitly, and unknown model names fall back to it anyway.
Keep max_tokens at or under 32,768, the most any of our models writes per request. Our Chat Completions reference accepts max_tokens as an alias for max_completion_tokens. If you’d rather send no output limit or temperature at all, the provider page says omitDefaults: true “omits Promptfoo’s default temperature and output limit.”
Configuring your target doesn’t change any of this. The configuration page says so directly: “configuring your target does not affect attack generation.”
Keep generation off Promptfoo’s servers
Setting redteam.provider alone doesn’t make the run fully local. The About the Grader page says “The redteam.provider configuration controls both attack generation and grading,” but recommends leaving remote generation on because it “produces significantly better attacks than local models.”
The data handling page says that with remote generation, grading sends “The prompt sent to your target”, “Your target’s response” and “Grading criteria” to api.promptfoo.app. To keep both jobs on your provider, it gives these variables:
export PROMPTFOO_DISABLE_REMOTE_GENERATION=true
export PROMPTFOO_DISABLE_TELEMETRY=1
The first switches off remote generation; the page warns “It is not a network isolation guarantee.” The second is separate, because that variable “does not disable telemetry.” The same page notes a narrower option, PROMPTFOO_DISABLE_REDTEAM_REMOTE_GENERATION=true, which turns off red-team remote generation but keeps it for SimulatedUser.
What that buys you on our side: prompts and responses sent to our API are never logged or stored. Keeps nothing follows one request through.
What you give up: the configuration page says “the quality of local generation depends greatly on the model that you configure, and is generally low for most models.” Judge the generated tests yourself before trusting a clean report.
Run it
npx promptfoo@latest redteam run
npx promptfoo@latest redteam report
Both commands come from the red teaming guide, which says redteam run creates redteam.yaml and runs the tests. The command line page lists --strict on both redteam run and redteam generate, to “Fail if any plugins fail to generate test cases.” Use it if a refusal or an error should stop the scan instead of shrinking it.
Grading with a different model
If you want the grader on another model, override it under defaultTest. The About the Grader page shows defaultTest.options.provider for this. Pointed at our API:
defaultTest:
options:
provider:
id: openai:chat:solcard-inference-large
config:
apiBaseUrl: https://api.solcardinference.ai/v1
apiKeyEnvar: SOLCARD_INFERENCE_KEY
One split: Fast, the cheapest, to generate many test cases, and Large, which always reasons, to grade them. Fast, Large or Base compares the three.
Rate limits and cost
A scan is many requests, so size it before you run it. The configuration page says numTests is the “Default number of tests to generate per plugin,” default 5, and each plugin can set its own.
On a plan, our per-minute limits are 120 requests on Starter, 300 on Pro and 600 on Max. The command line page lists -j, --max-concurrency and --delay (milliseconds between calls) on redteam run to stay under them.
A worked example: 100 attacker and grader calls at about 1,500 input and 800 output tokens each come to about $0.39 on Fast and about $1.06 on Large plus its reasoning, at pay-as-you-go rates. Repeated system prompts may bill at the cached input rate, a tenth of the input price. Those token counts are our assumption, so run a small scan first and check what it cost before a big one.
FAQ
Does SolCard Inference have a Promptfoo provider of its own?
No. The generic openai:chat: provider with our apiBaseUrl is the whole integration.
Why am I still getting fewer tests than numTests?
The troubleshooting page also lists rate limits and missing plugin API keys, and says to “run with --verbose to see detailed logs of any generation failures or refusals.”
Do custom plugins work without an OpenAI key?
The configuration page says “Custom plugins and strategies require an OpenAI key or your own provider configuration.” A redteam.provider on our API is your own provider configuration.
Can I use the attacker for anything besides my own app? Point it at systems you own or are authorized to test. Our models are for security research, red-teaming and hardening safety classifiers, not for harming people or breaking the law. Abliterated, uncensored, jailbroken explains what refusal removal does and doesn’t change.
Can the target be one of your models too?
Yes: the provider page’s gateway example puts the same id and config under providers. That’s useful when you’re hardening a safety classifier and want to see what an unrefusing model says.