Provider Selection
Provider Selection
Select the CLI provider before starting a scan. Each scanner slot draws its model from the selected preset, with optional per-slot overrides. Provider failover depends on the preset and reporting policy described below.
Supported Providers
| Provider | Wire format | Key | Notes |
|---|---|---|---|
| OpenRouter | OpenAI-compatible /chat/completions | OPENROUTER_API_KEY | Default and recommended. One key, 200+ models across many upstream providers — pick the best model per task |
| Anthropic (direct) | Anthropic Messages API | ANTHROPIC_API_KEY | Direct Claude API via x-api-key. Single-provider option (CLI 3.7.5 / WEB 1.5.33) |
| Z.ai | OpenAI-compatible /chat/completions | GLM_API_KEY | Direct Z.ai API using the GLM model family. Single-provider option |
| Amazon Bedrock (beta) | Bedrock Converse | AWS role/profile; optional AWS_BEARER_TOKEN_BEDROCK | CLI and its WEB configuration panel; real AWS validation pending |
Each provider ships as a preset: selecting it auto-configures the model for every scanner slot. You can still override individual slot models afterward.
OpenRouter (Default)
OpenRouter is the recommended provider. A single OpenRouter key gives access to 200+ models from multiple upstream providers, so each scanner slot can use the best-suited model for its task (a diverse mutation model, a precise skeptical model, and so on).
OPENROUTER_API_KEY="sk-or-v1-..."The recommended OpenRouter preset is tuned against an anti-BS benchmark for the security-reasoning slots.
Anthropic (Direct API)
Anthropic is a first-class provider using an API key (x-api-key) against the Claude Messages API. Selecting the anthropic preset routes generation, threaded generation, vision, and connectivity checks to the Messages API.
ANTHROPIC_API_KEY="sk-ant-..."The api_format Field
Anthropic uses a different HTTP wire format than the OpenAI-compatible providers. A preset field named api_format (apiFormat in the WEB provider config) decouples the wire format from the base URL, so the client knows to build Anthropic-style requests (x-api-key header, top-level system, content[] blocks) instead of an OpenAI-style chat-completions body. OpenRouter and Z.ai keep the openai wire format; Anthropic uses anthropic.
This API-key provider is distinct from an OAuth-based Claude mode. To use the API-key provider, select the
anthropicpreset and supplyANTHROPIC_API_KEY.
Z.ai (GLM Family)
Z.ai is a direct, single-provider option using the GLM model family (for example glm-4.7-flash, glm-4.6, glm-4.5). It uses the OpenAI-compatible wire format.
GLM_API_KEY="..."Amazon Bedrock (Beta)
CLI 4.0.34-beta adds Bedrock Converse for text, conversation history, vision and
connectivity checks. WEB 2.0.37-beta adds the source-region control to its CLI
Provider panel, including region-only edits and connection tests without a key.
The CLI runtime uses its AWS role/profile credential chain, or an optional
Bedrock API key from AWS_BEARER_TOKEN_BEDROCK. A host AWS profile must be made
available explicitly when the CLI runs in a container.
Set BEDROCK_REGION or use the runtime’s AWS region/profile configuration.
Models and inference profiles must be approved for your account; a source region
does not guarantee processing stays in that region. The preset uses
amazon.nova-pro-v1:0; explicit [LLM_MODELS] overrides must use AWS-compatible IDs.
Bedrock has no external provider fallback by default. Reporting fallback also
requires the explicit BEDROCK_ALLOW_EXTERNAL_REPORTING_FAILOVER=true opt-in
before sending reporting data to another provider.
Validation: offline tests cover the real minimum SDK serializer and bearer/ SigV4 authentication with network requests intercepted. Live AWS access, model permissions, quotas and credential renewal remain unverified. See the setup and account-validation guide. The separate BugTraceAI-API engine, WEB assistant and ModelLab are outside this delivery.
Selecting a Provider
In BugTraceAI-WEB
Use the Provider tab:
- Select a provider preset.
- Enter the provider’s API key and click Test to validate it (the correct wire format is used per provider, so a valid Anthropic key is not misreported as invalid).
- Click Save.
Switching providers at runtime re-applies the full provider configuration — base URL, key, api_format, and every provider-scoped attribute — as a single unit, so no stale wire format is left behind.
In the CLI Configuration
The active provider is set in the [PROVIDER] section of bugtraceaicli.conf:
[PROVIDER]# openrouter (recommended) | zai | anthropicACTIVE = openrouterChanging the provider auto-configures all slot models from that provider’s preset. Provider API keys are read from the environment (.env): OPENROUTER_API_KEY, GLM_API_KEY, or ANTHROPIC_API_KEY.
One Provider Per Scan
A scan uses a single active provider from start to finish. BugTraceAI does not mix providers mid-scan, and switching providers does not affect a scan already in progress.
The one scoped exception is reporting/enrichment failover: if a PoC or CVSS enrichment call fails or degrades at reporting time, the reporting layer can fall back to a secondary provider for that single enrichment call only. This never changes the scan’s active provider or mixes providers during detection. It is configurable via REPORTING_FAILOVER_ENABLED and REPORTING_FAILOVER_PROVIDER (default: enabled, falling back to anthropic). See Report Generation for details.
Per-Slot Model Configuration
Within the active provider, each scanner slot draws its own model. Presets set sensible defaults; you can override any slot in the [LLM_MODELS] configuration section. The slots that Model Lab benchmarks map directly to these keys:
| Slot | Config key | Role |
|---|---|---|
| MUTATION | MUTATION_MODEL | Payload mutation / WAF bypass generation |
| SKEPTICAL | SKEPTICAL_MODEL | Per-finding skeptical review |
| ANALYSIS | ANALYSIS_MODEL | DASTySAST high-volume per-URL analysis |
| REPORTING | REPORTING_MODEL | Report enrichment (CVSS + PoC) |
Other slots include DEFAULT_MODEL (orchestration and strategy), CODE_MODEL (payload/bypass logic), and VISION_MODEL (screenshot validation).
Use Model Lab to benchmark candidate models per slot before committing to an assignment.
Parent: Configuration
See also: Model Lab | Configuration | Report Generation