pub struct ConfigProfile {Show 57 fields
pub model: Option<String>,
pub base_url: Option<String>,
pub api_key_env: Option<String>,
pub api_key_cmd: Option<String>,
pub system_prompt: Option<String>,
pub append_system_prompt: Option<String>,
pub temperature: Option<f32>,
pub max_tokens: Option<u32>,
pub effort: Option<String>,
pub sandbox: Option<String>,
pub approval: Option<String>,
pub project_context: Option<bool>,
pub max_iterations: Option<usize>,
pub additional_dirs: Option<Vec<String>>,
pub compact_after_messages: Option<usize>,
pub cache_plan: Option<String>,
pub tool_advertising: Option<String>,
pub tool_advertising_core: Option<Vec<String>>,
pub schema_tier: Option<String>,
pub auto_approved_tools: Option<Vec<String>>,
pub tool_deny_patterns: Option<Vec<String>>,
pub tool_allow_patterns: Option<Vec<String>>,
pub extra_headers: Option<HashMap<String, String>>,
pub extra_body: Option<Map<String, Value>>,
pub max_tool_output_bytes: Option<usize>,
pub max_total_output_tokens: Option<u64>,
pub prompts: Option<HashMap<String, String>>,
pub tool_overrides: Option<HashMap<String, ToolOverrideProfile>>,
pub env_context: Option<bool>,
pub project_root_markers: Option<Vec<String>>,
pub project_doc_max_bytes: Option<usize>,
pub instruction_imports: Option<bool>,
pub retry_enabled: Option<bool>,
pub retry_max_retries: Option<u32>,
pub retry_base_delay_ms: Option<u64>,
pub compaction_reserve_tokens: Option<u64>,
pub compaction_keep_recent_tokens: Option<u64>,
pub compaction_focus_instructions: Option<String>,
pub auto_title: Option<bool>,
pub steering_mode: Option<String>,
pub follow_up_mode: Option<String>,
pub read_file_multimodal: Option<bool>,
pub edit_file_require_read_before_edit: Option<bool>,
pub edit_file_notebook_aware: Option<bool>,
pub shell_env_snapshot: Option<bool>,
pub doom_loop_threshold: Option<u32>,
pub nested_instructions: Option<bool>,
pub model_switch_allow_switch: Option<bool>,
pub context_injections: Option<bool>,
pub compaction_enabled: Option<bool>,
pub parallel_tool_calls: Option<bool>,
pub session_git_metadata: Option<bool>,
pub session_dir: Option<String>,
pub session_persist: Option<bool>,
pub session_name: Option<String>,
pub session_retention_days: Option<u32>,
pub session_export_format: Option<String>,
}Expand description
The serializable subset of a Config that can live in a config file.
(Callbacks/handlers are code-only and are not represented here.)
Grown from its original 9 fields to the P1 §3.2 surface
(COMPOSABLE-HARNESS-DESIGN.md §5.2 “P1” migration step): every [core]
scalar/table/array Config maps to lives here so it becomes file-settable
for the first time, per the design’s stated framing gap (§3.0).
Fields§
§model: Option<String>Model id.
base_url: Option<String>Endpoint base URL.
api_key_env: Option<String>Environment variable to read the API key from (§3.1 core.api_key_env;
§3.2: “today absent from BOTH files”).
api_key_cmd: Option<String>Credential-helper command (§3.1 core.api_key_cmd, D6 row) — see
Config::api_key_cmd.
system_prompt: Option<String>System prompt.
append_system_prompt: Option<String>P4 (§3.1 core.append_system_prompt, D2 row 1): an additive suffix
composed onto whatever Self::system_prompt resolves to (the
profile’s own value if set, else whatever the builder already had —
see ConfigBuilder::apply_profile’s composition order), distinct
from REPLACING it. [project-forbidden], same trust boundary as
system_prompt (§3.3: prompt injection).
temperature: Option<f32>Sampling temperature.
max_tokens: Option<u32>Output token cap per request.
effort: Option<String>Reasoning/effort level.
sandbox: Option<String>Sandbox policy: read_only | workspace_write | danger_full_access.
approval: Option<String>Approval policy: never | on_request | untrusted.
project_context: Option<bool>Auto-load CLAUDE.md / AGENTS.md.
max_iterations: Option<usize>Per-send iteration budget (§3.1 core.max_iterations).
additional_dirs: Option<Vec<String>>Extra roots beyond cwd (§3.1 core.additional_dirs); arrays
replace wholesale on overlay (§3.3).
compact_after_messages: Option<usize>Compact once the conversation exceeds this many messages (§3.1
core.compaction.after_messages; 0 = trigger off).
cache_plan: Option<String>Prompt-caching plan: off | imported_prefix (§3.1
capabilities.cache.plan).
tool_advertising: Option<String>How tools are advertised: full | deferred (§3.1
capabilities.deferred_tools).
tool_advertising_core: Option<Vec<String>>The eagerly-advertised core allowlist when tool_advertising = "deferred" (§3.1 capabilities.deferred_tools.core); arrays replace.
schema_tier: Option<String>Global tool-schema tier: full | medium | minimal (§3.1
core.tools.schema_tier).
auto_approved_tools: Option<Vec<String>>Tools that never require approval under ApprovalPolicy::OnRequest
(§3.1 capabilities.permissions.auto_approved_tools); arrays replace.
tool_deny_patterns: Option<Vec<String>>P4: deny-pattern generalization of auto_approved_tools (§3.1
capabilities.permissions.rules.deny) — see
Config::tool_deny_patterns. Arrays replace.
tool_allow_patterns: Option<Vec<String>>P4: allow-pattern generalization of auto_approved_tools (§3.1
capabilities.permissions.rules.allow) — see
Config::tool_allow_patterns. Arrays replace.
extra_headers: Option<HashMap<String, String>>Extra HTTP headers merged in (§3.1 core.extra_headers); a table,
merged key-wise on overlay (§3.3).
extra_body: Option<Map<String, Value>>Extra request-body fields merged in (§3.1 core.extra_body); a
table, merged key-wise on overlay (§3.3).
max_tool_output_bytes: Option<usize>Max bytes of a single tool result (§3.1 core.max_tool_output_bytes).
max_total_output_tokens: Option<u64>Cap on cumulative output tokens per send loop (§3.1
core.max_total_output_tokens).
prompts: Option<HashMap<String, String>>Named prompt templates (§3.1 [core.prompts]); a table, merged
key-wise (new/overridden names layer onto the built-ins, they don’t
wholesale-replace them).
tool_overrides: Option<HashMap<String, ToolOverrideProfile>>Per-tool enable/disable + description/schema-tier overrides, keyed
by tool name (§3.1 [core.tools.<name>], §3.2 “today in no file”);
a table, merged key-wise per tool.
env_context: Option<bool>P4b (S3.1 core.env_context) – see Config::env_context.
project_root_markers: Option<Vec<String>>P4b (S3.1 core.project_root_markers) – see
Config::project_root_markers; arrays replace.
project_doc_max_bytes: Option<usize>P4b (S3.1 core.project_doc_max_bytes) – see
Config::project_doc_max_bytes.
instruction_imports: Option<bool>P4b (S3.1 core.instruction_imports) – see
Config::instruction_imports.
retry_enabled: Option<bool>P4b (S3.1 core.retry.enabled) – see Config::retry_enabled.
retry_max_retries: Option<u32>P4b (S3.1 core.retry.max_retries) – see Config::retry_max_retries.
retry_base_delay_ms: Option<u64>P4b (S3.1 core.retry.base_delay_ms) – see
Config::retry_base_delay_ms.
compaction_reserve_tokens: Option<u64>P4b (S3.1 core.compaction.reserve_tokens) – see
Config::compaction_reserve_tokens.
compaction_keep_recent_tokens: Option<u64>P4b (S3.1 core.compaction.keep_recent_tokens) – see
Config::compaction_keep_recent_tokens.
compaction_focus_instructions: Option<String>P4b (S3.1 core.compaction.focus_instructions) – see
Config::compaction_focus_instructions.
auto_title: Option<bool>P4b (S3.1 core.session.auto_title) – see Config::auto_title.
steering_mode: Option<String>P4b (S3.1 core.steering.steering_mode) – see
Config::steering_mode.
follow_up_mode: Option<String>P4b (S3.1 core.steering.follow_up_mode) – see
Config::follow_up_mode.
read_file_multimodal: Option<bool>P4c (S3.1 core.tools.read_file.multimodal) – see
Config::read_file_multimodal.
edit_file_require_read_before_edit: Option<bool>P4c (S3.1 core.tools.edit_file.require_read_before_edit) – see
Config::edit_file_require_read_before_edit.
edit_file_notebook_aware: Option<bool>P4c (S3.1 core.tools.edit_file.notebook_aware) – see
Config::edit_file_notebook_aware.
shell_env_snapshot: Option<bool>P4c (S3.1 core.shell_env_snapshot) – see
Config::shell_env_snapshot.
doom_loop_threshold: Option<u32>P4c (S3.1 core.doom_loop_threshold) – see
Config::doom_loop_threshold.
nested_instructions: Option<bool>P4c (S3.1 core.nested_instructions) – see
Config::nested_instructions.
model_switch_allow_switch: Option<bool>P4c (S3.1 core.model_switch.allow_switch) – see
Config::model_switch_allow_switch.
context_injections: Option<bool>P4e (S3.1 core.context_injections) – see
Config::context_injections. Only the boolean gate is
file/profile-settable; Config::context_injection_blocks’ actual
content is code-only (see its doc comment).
compaction_enabled: Option<bool>P4e (S3.1 core.compaction.enabled) – see
Config::compaction_enabled.
parallel_tool_calls: Option<bool>P4e (S3.1 core.parallel_tool_calls) – see
Config::parallel_tool_calls.
session_git_metadata: Option<bool>P4e (S3.1 core.session.git_metadata) – see
Config::session_git_metadata.
session_dir: Option<String>P4e (S3.1 core.session.dir) – see Config::session_dir.
session_persist: Option<bool>P4e (S3.1 core.session.persist) – see Config::session_persist.
session_name: Option<String>P4e (S3.1 core.session.name) – see Config::session_name.
session_retention_days: Option<u32>P4e (S3.1 core.session.retention_days) – see
Config::session_retention_days.
session_export_format: Option<String>P4e (S3.1 core.session.export_format) – see
Config::session_export_format. "text" | "html"; an
unrecognized string is a no-op warning, like steering_mode.
Trait Implementations§
Source§impl Clone for ConfigProfile
impl Clone for ConfigProfile
Source§fn clone(&self) -> ConfigProfile
fn clone(&self) -> ConfigProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more