pub struct AiBackendArgs {
pub ai_backend: Option<AiBackend>,
pub model: Option<String>,
pub beta_header: Option<String>,
pub claude_cli_allow_tools: bool,
pub claude_cli_allow_mcp: bool,
pub claude_cli_max_budget_usd: Option<f64>,
pub models_yaml: ModelsYamlArg,
}Expand description
The AI backend flags, flattened onto every command that builds an AI
client (git commit message {twiddle,check,staged}, git branch create pr,
ai chat, ai jev verify-decision).
Fields§
§ai_backend: Option<AiBackend>Selects the AI backend used by this command.
Overrides the OMNI_DEV_AI_BACKEND environment variable and the
legacy USE_OPENAI/USE_OLLAMA/CLAUDE_CODE_USE_BEDROCK variables
(default forces the direct Anthropic API even when they are set).
model: Option<String>AI model to use for this command.
Highest-precedence model selector: it overrides OMNI_DEV_MODEL and
every per-backend model variable (CLAUDE_MODEL, CLAUDE_CODE_MODEL,
ANTHROPIC_MODEL, OPENAI_MODEL, OLLAMA_MODEL). Equivalent to
setting OMNI_DEV_MODEL.
beta_header: Option<String>Beta header to send with AI API requests (format: key:value).
Only sent if the model supports it in the model registry. Equivalent
to setting OMNI_DEV_BETA_HEADER. Ignored when --ai-backend is
claude-cli (the CLI negotiates betas itself).
claude_cli_allow_tools: boolWeakens the claude-cli sandbox by allowing the nested claude -p
session to use its default built-in tools (Read, Edit, Write, Bash,
Glob, Grep).
Only use for deliberately tool-capable use cases. By default the
nested session runs with --tools "" and cannot touch the
file system. This flag removes that guard. The prompt is built from
untrusted content (diffs, commit messages, JIRA text), so well-known
secret env vars (*_API_KEY, *_TOKEN, etc.) are scrubbed from the
nested session; set OMNI_DEV_CLAUDE_CLI_KEEP_ENV to exempt names.
Equivalent to setting OMNI_DEV_CLAUDE_CLI_ALLOW_TOOLS=true.
Independent of --claude-cli-allow-mcp.
Ignored when --ai-backend is not claude-cli.
claude_cli_allow_mcp: boolWeakens the claude-cli sandbox by allowing the nested claude -p
session to load MCP servers from ~/.claude/settings.json.
Only use deliberately. MCP servers commonly hold OAuth tokens
(Gmail, Drive, Slack) and may be arbitrary network-attached services;
enabling this exposes them to the nested session. By default the
session runs with --strict-mcp-config and no MCP servers load.
Equivalent to setting OMNI_DEV_CLAUDE_CLI_ALLOW_MCP=true.
Independent of --claude-cli-allow-tools.
Ignored when --ai-backend is not claude-cli.
claude_cli_max_budget_usd: Option<f64>Per-invocation spending cap in USD for the claude-cli backend.
Forwarded to claude -p --max-budget-usd. When the nested session
exceeds this budget it aborts rather than running away with cost.
Equivalent to setting OMNI_DEV_CLAUDE_CLI_MAX_BUDGET_USD.
Ignored when --ai-backend is not claude-cli.
models_yaml: ModelsYamlArg--models-yaml, shared with config models show.
Implementations§
Source§impl AiBackendArgs
impl AiBackendArgs
Trait Implementations§
Source§impl Args for AiBackendArgs
impl Args for AiBackendArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl Clone for AiBackendArgs
impl Clone for AiBackendArgs
Source§impl Debug for AiBackendArgs
impl Debug for AiBackendArgs
Source§impl Default for AiBackendArgs
impl Default for AiBackendArgs
Source§impl FromArgMatches for AiBackendArgs
impl FromArgMatches for AiBackendArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for AiBackendArgs
impl RefUnwindSafe for AiBackendArgs
impl Send for AiBackendArgs
impl Sync for AiBackendArgs
impl Unpin for AiBackendArgs
impl UnsafeUnpin for AiBackendArgs
impl UnwindSafe for AiBackendArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more