Configuration
PromptBus is configured via a YAML file at config/rules.yaml. This file controls all routing behavior, model mappings, and system settings.
Default Configuration
config/rules.yaml
version: 1
enabled: true
default_model: claude-sonnet-5
routes:
- when:
task_type: read_explain
min_confidence: 0.6
use:
model: claude-haiku-4-5
effort: low
- when:
task_type: small_edit
use:
model: claude-sonnet-5
effort: medium
- when:
task_type: multi_file_refactor
never_downgrade: true
- when:
task_type: planning
never_downgrade: true
- when:
task_type: debug_loop
never_downgrade: true
- when:
task_type: test_generation
use:
model: claude-sonnet-5
effort: medium
- when:
task_type: unknown
never_downgrade: true
confidence_floor_for_any_downgrade: 0.6
log_retention_days: 90
log_request_bodies: falseConfiguration Fields
Top-Level Settings
| Field | Type | Default | Description |
|---|---|---|---|
| version | number | 1 | Config schema version |
| enabled | boolean | true | Master toggle for routing logic |
| default_model | string | claude-sonnet-5 | Fallback model when no rule matches |
| confidence_floor_for_any_downgrade | number | 0.6 | Minimum confidence to allow any downgrade (0.0–1.0) |
| log_retention_days | number | 90 | Days to keep logs before auto-pruning |
| log_request_bodies | boolean | false | Store full request bodies in logs |
Route Rules
Each route rule has a when condition and either a use action or never_downgrade: true.
When Conditions
| Field | Type | Description |
|---|---|---|
| task_type | string | One of: read_explain, small_edit, multi_file_refactor, planning, debug_loop, test_generation, unknown |
| min_confidence | number (optional) | Minimum confidence threshold for this rule (0.0–1.0) |
Use Action
| Field | Type | Description |
|---|---|---|
| model | string | Target model ID (e.g., claude-haiku-4-5) |
| effort | string | Output effort level: low, medium, or high |
Pricing Configuration
Pricing data is stored in the same YAML file under the pricing key. This is used for savings calculations in the dashboard.
config/rules.yaml (pricing section)
pricing:
claude-fable-5:
input_per_mtok: 10
output_per_mtok: 50
claude-mythos-5:
input_per_mtok: 8
output_per_mtok: 40
claude-opus-4-8:
input_per_mtok: 5
output_per_mtok: 25
claude-sonnet-5:
input_per_mtok: 3
output_per_mtok: 15
claude-haiku-4-5:
input_per_mtok: 1
output_per_mtok: 5Editing from the Dashboard
You can also edit routing rules directly from the PromptBus dashboard at http://localhost:4702. The dashboard provides:
- A dropdown to select task type
- Text input for target model
- Dropdown for effort level
- Checkbox for
never_downgrade - Advanced settings (confidence floor, log retention, log bodies)
Changes made in the dashboard are validated before being written to the YAML file.