Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion docs/control/reference/rest_api/headers/security_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ This header is **optional** and can be used in Headers-Only Mode to fine-tune se
"detect_tool_error_regex_pattern": null,
"detect_tool_error_max_result_length": null,
"strict_tool_result_parsing": null,
"tool_result_transform": null
"tool_result_transform": null,
"n_pllm_plans": null,
"pllm_candidate_models": null,
"pllm_context_pruning": null
},
"prompt": {
"pllm": {
Expand Down Expand Up @@ -267,6 +270,30 @@ Transform applied to tool results before processing:
- `"none"`: No transformation
- `"codex"`: Apply codex-style transformation to tool results

#### `fsm.n_pllm_plans`

| Type | Required | Default | Constraints |
|------|----------|---------|-------------|
| `integer` or `null` | No | `null` | >= 1 |

Number of PLLM plans to generate per step. When > 1, multiple plans are generated concurrently and the best one is selected by a selection LLM. Models are assigned round-robin from `pllm_candidate_models`; when the model list is shorter than `n_pllm_plans`, extra candidates reuse the same models with different sampling seeds for diversity. When not set, the server default is `1`.

#### `fsm.pllm_candidate_models`

| Type | Required | Default |
|------|----------|---------|
| `array[string]` or `null` | No | `null` |

Distinct model names to round-robin across when generating multiple PLLM plans. When empty or `null`, the request model is used for all candidates.

#### `fsm.pllm_context_pruning`

| Type | Required | Default |
|------|----------|---------|
| `boolean` or `null` | No | `null` |

Whether to hide context variable values from all PLLM steps except the current one. Context vars are cumulative, so older steps contain redundant data. When not set, the server default is `true`.

---

## Prompt Overrides (`prompt`)
Expand Down
18 changes: 18 additions & 0 deletions src/sequrity/control/types/headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,24 @@ class FsmOverrides(BaseModel):
"'none': no transform; 'codex': strip Codex CLI metadata prefix and "
"extract exit code + output.",
)
n_pllm_plans: int | None = Field(
default=None,
description="Number of PLLM plans to generate per step. When > 1, multiple plans are generated "
"concurrently and the best one is selected by a selection LLM. "
"Models are assigned round-robin from pllm_candidate_models; when the model list is shorter "
"than n_pllm_plans, extra candidates reuse the same models with different sampling seeds "
"for diversity.",
)
pllm_candidate_models: set[str] | None = Field(
default=None,
description="Distinct model names to round-robin across when generating multiple PLLM plans. "
"When empty or null, the request model is used for all candidates.",
)
pllm_context_pruning: bool | None = Field(
default=None,
description="Whether to hide context variable values from all PLLM steps except the current one. "
"Context vars are cumulative, so older steps contain redundant data.",
)


class PllmPromptOverrides(BaseModel):
Expand Down
3 changes: 3 additions & 0 deletions test/control/test_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ def test_all_entries_set(self):
prune_failed_steps=True,
enabled_internal_tools=["parse_with_ai", "verify_hypothesis"],
max_tool_calls_per_step=100,
n_pllm_plans=2,
pllm_candidate_models={"gpt-5-mini", "gpt-5-nano"},
pllm_context_pruning=True,
),
prompt=PromptOverrides(
pllm=PllmPromptOverrides(
Expand Down
Loading
Loading