Repository: promptfoo/promptfoo
Issue: red teaming plugin harmful:misinformation-disinformation and promptfoo:redteam:harmful:specialized-advice failed
Root cause: Validation Gap

**Describe the bug**

I ran a red teaming test using the harmful:misinformation-disinformation and promptfoo:redteam:harmful:specialized-advice plugins.

I got two errors because the plugins don't have a prompt.

I ran the test directly in the UI Setup program.

The error message is as follows:
```
Error: Invariant failed: Grader promptfoo:redteam:harmful:misinformation-disinformation must have a prompt

Error: Invariant failed: Grader promptfoo:redteam:harmful:misinformation-disinformation must have a prompt
    at invariant (/opt/homebrew/Cellar/promptfoo/0.118.17/libexec/lib/node_modules/promptfoo/dist/src/util/invariant.js:24:11)
    at handleRedteam (/opt/homebrew/Cellar/promptfoo/0.118.17/libexec/lib/node_modules/promptfoo/dist/src/assertions/redteam.js:33:29)
    at runAssertion (/opt/homebrew/Cellar/promptfoo/0.118.17/libexec/lib/node_modules/promptfoo/dist/src/assertions/index.js:347:44)
    at /opt/homebrew/Cellar/promptfoo/0.118.17/libexec/lib/node_modules/promptfoo/dist/src/assertions/index.js:398:30
    at /opt/homebrew/Cellar/promptfoo/0.118.17/libexec/lib/node_modules/promptfoo/node_modules/async/dist/async.js:151:38
    at replenish (/opt/homebrew/Cellar/promptfoo/0.118.17/libexec/lib/node_modules/promptfoo/node_modules/async/dist/async.js:447:21)
    at /opt/homebrew/Cellar/promptfoo/0.118.17/libexec/lib/node_modules/promptfoo/node_modules/async/dist/async.js:452:13
    at Object.eachOfLimit (/opt/homebrew/Cellar/promptfoo/0.118.17/libexec/lib/node_modules/promptfoo/node_modules/async/dist/async.js:478:36)
    at /opt/homebrew/Cellar/promptfoo/0.118.17/libexec/lib/node_modules/promptfoo/node_modules/async/dist/async.js:220:25
    at new Promise (<anonymous>)
```

**To Reproduce**
Steps to reproduce the behavior, including example Promptfoo configurations if applicable:

I used the following config:
```
description: reproduce_bug
targets:
  - id: file:///xxxxxxxxxxxxxxxxx/plugin_bug.py
    config:
      verbose: true
    label: reproduce_bug
    delay: 1000
prompts:
  - '{{prompt}}'
redteam:
  purpose: ''
  plugins:
    - id: harmful:misinformation-disinformation  # Tests handling of false information campaigns
    - id: harmful:specialized-advice  # Tests handling of unauthorized professional advice
  strategies: []
  numTests: 1
  maxConcurrency: 10
defaultTest:
  vars: {}
  options:
    transformVars: '{ ...vars, sessionId: context.uuid }'
```

The python script is as follow:
```
def call_api(prompt, options, context: dict):
    return {
        "output": "I don't want to talk to you."
    }
```

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**System information:**

If possible, please output the results of `promptfoo debug` and paste the output here.

```
{
  "version": "0.118.17",
  "platform": {
    "os": "darwin",
    "release": "24.6.0",
    "arch": "arm64",
    "nodeVersion": "v24.10.0"
  },
  "env": {},
  "configInfo": {
    "configExists": false,
    "configContent": null
  }
}
```

**Additional context**
Add any other context about the problem here.


Hi @Gii16! I can see what's happening - this is related to how the redteam setup UI handles testing. The UI Setup's test/preview feature tries to run a quick validation of your target without going through the full redteam generate step first. Since your config uses prompts: - '{{prompt}}' (a template) there's no prompt to test with. We'll get a fix out for you

@mldangelo Thanks!