pub struct PermissionLevelConfig {Show 16 fields
pub level: Option<u8>,
pub max_tier: Option<String>,
pub model_access: Option<Vec<String>>,
pub model_denylist: Option<Vec<String>>,
pub tool_access: Option<Vec<String>>,
pub tool_denylist: Option<Vec<String>>,
pub max_context_tokens: Option<usize>,
pub max_output_tokens: Option<usize>,
pub rate_limit: Option<u32>,
pub streaming_allowed: Option<bool>,
pub escalation_allowed: Option<bool>,
pub escalation_threshold: Option<f32>,
pub model_override: Option<bool>,
pub cost_budget_daily_usd: Option<f64>,
pub cost_budget_monthly_usd: Option<f64>,
pub custom_permissions: Option<HashMap<String, Value>>,
}Expand description
Configuration for a single permission level or override.
When used as a level default, all fields are meaningful. When used as a per-user or per-channel override, only specified fields apply – the rest inherit from the user’s resolved level defaults.
All fields are Option to support partial overrides.
Fields§
§level: Option<u8>Permission level (0 = zero_trust, 1 = user, 2 = admin).
max_tier: Option<String>Maximum model tier this user can access.
model_access: Option<Vec<String>>Explicit model allowlist. Empty = all models in allowed tiers.
model_denylist: Option<Vec<String>>Explicit model denylist. Checked after allowlist.
tool_access: Option<Vec<String>>Tool names this user can invoke. ["*"] = all tools.
tool_denylist: Option<Vec<String>>Tool names explicitly denied even if tool_access allows.
max_context_tokens: Option<usize>Maximum input context tokens.
max_output_tokens: Option<usize>Maximum output tokens per response.
rate_limit: Option<u32>Rate limit in requests per minute. 0 = unlimited.
streaming_allowed: Option<bool>Whether SSE streaming responses are allowed.
escalation_allowed: Option<bool>Whether complexity-based escalation to a higher tier is allowed.
escalation_threshold: Option<f32>Complexity threshold (0.0-1.0) above which escalation triggers.
model_override: Option<bool>Whether the user can manually override model selection.
cost_budget_daily_usd: Option<f64>Daily cost budget in USD. 0.0 = unlimited.
cost_budget_monthly_usd: Option<f64>Monthly cost budget in USD. 0.0 = unlimited.
custom_permissions: Option<HashMap<String, Value>>Extensible custom permission dimensions.
Trait Implementations§
Source§impl Clone for PermissionLevelConfig
impl Clone for PermissionLevelConfig
Source§fn clone(&self) -> PermissionLevelConfig
fn clone(&self) -> PermissionLevelConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more