Skip to main content

agentmux_srv_core/backend/providers/
gemini.rs

1// Copyright 2025-2026, AgentMux Corp.
2// SPDX-License-Identifier: Apache-2.0
3
4use super::{Tier, ProviderConfig, ControllerType};
5
6pub(super) static GEMINI: ProviderConfig = ProviderConfig {
7    id: "gemini",
8    tier: Tier::FirstClass,
9    cli_command: "gemini",
10    controller_type: ControllerType::Subprocess,
11    app_server: None,
12    // --output-format stream-json: NDJSON events; --yolo: auto-approve all tools;
13    // -p "": enable headless/non-interactive mode (prompt comes from stdin)
14    launch_args: &["--output-format", "stream-json", "--yolo", "-p", ""],
15    persistent_launch_args: None,
16    resume_flag: Some("-r"),
17    session_id_field: "session_id",
18    styled_output_format: "gemini-json",
19    auth_config_dir_env_var: "GEMINI_CLI_HOME",
20    auth_dir_name: "gemini",
21    history_native_subdir: Some("history"),
22    auth_extra_env: &[("GEMINI_FORCE_FILE_STORAGE", "true")],
23    unset_env: &[],
24    npm_package: "@google/gemini-cli",
25    pinned_version: "0.71.1",
26    base_url_env_var: None,
27    supported_vendors: &["google"],
28    // Confirmed: Gemini CLI docs — context files default to GEMINI.md;
29    // AGENTS.md support exists but requires an explicit contextFileName
30    // override, so GEMINI.md is the correct default-behavior target. See
31    // docs/specs/SPEC_PROVIDER_AWARE_STARTUP_INSTRUCTIONS_2026_08_24.md §2.
32    startup_instructions_filename: Some("GEMINI.md"),
33    // Read set = the write target. AGENTS.md is supported only behind an
34    // explicit contextFileName override, so it is not read by default.
35    native_instruction_sources: &["GEMINI.md"],
36    native_instruction_dirs: &[],
37};