feat: add gemini-acp provider, update docs on subscription models + improvements to codex#8000
feat: add gemini-acp provider, update docs on subscription models + improvements to codex#8000michaelneale merged 10 commits intomainfrom
Conversation
Add ACP provider for Google's Gemini CLI, which supports ACP natively via the --acp flag. This follows the same pattern as claude-acp and codex-acp, using the shared AcpProvider infrastructure. The provider spawns 'gemini --acp' over stdio and maps Goose modes to Gemini's approval modes (yolo, default, auto_edit, plan). Signed-off-by: Michael Neale <michael.neale@gmail.com>
* origin/main: fix(openai): use Responses API for gpt-5.4 (#7982) Remove lead/worker provider (#7989) chore(release): release version 1.28.0 (#7991) Fix empty tool results from resource content (e.g. auto visualiser) (#7866) Separate SSE streaming from POST work submission (#7834) fix: include token usage in Databricks streaming responses (#7959) Optimize tool summarization (#7938)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 246bf157b8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| env_remove: vec![], | ||
| work_dir: std::env::current_dir().unwrap_or_else(|_| PathBuf::from(".")), | ||
| mcp_servers: extension_configs_to_mcp_servers(&extensions), | ||
| session_mode_id: Some(map_goose_mode(goose_mode)), |
There was a problem hiding this comment.
Derive the initial ACP mode from the session, not global config
This freezes session_mode_id from Config::get_goose_mode() at provider construction time. That breaks the common path where Goose changes the mode before the first prompt (ExecutionManager::get_or_create_session and Agent::restore_provider_from_session both call update_mode() pre-session): AcpProvider::update_mode() only updates its in-memory GooseMode, but session/new later still uses the stale session_mode_id. A new or resumed gemini-acp session opened in Chat/Approve/SmartApprove can therefore start its first turn in whatever global mode was active at startup (often yolo), which is a real approval/safety regression.
Useful? React with 👍 / 👎.
| let provider_config = AcpProviderConfig { | ||
| command: resolved_command, | ||
| args: vec!["--acp".to_string()], | ||
| env: vec![], |
There was a problem hiding this comment.
Pass Goose's selected Gemini model into the ACP subprocess
Unlike the existing gemini-cli provider, this ACP provider never threads model.model_name into Gemini: it always spawns gemini --acp, and AcpProvider::stream() ignores _model_config when creating the session. As a result, any non-default model selected in Goose (for example flash/pro) is silently ignored and Gemini falls back to its own default model, even though Gemini CLI's current reference documents --model/-m for model selection (https://geminicli.com/docs/cli/cli-reference/).
Useful? React with 👍 / 👎.
- Add gemini-acp to ACP providers table in providers.md - Add Gemini ACP setup, config, and usage to acp-providers.md - Mark claude-code, codex, and gemini-cli as deprecated in provider descriptions (source code and docs), pointing to ACP alternatives - Add deprecation banner to cli-providers.md - Add subscription usage tip to acp-providers.md - Include ACP provider testing guide Signed-off-by: Michael Neale <michael.neale@gmail.com>
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d1eda89a2e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| GooseMode::Auto => "yolo".to_string(), | ||
| GooseMode::Approve => "default".to_string(), | ||
| GooseMode::SmartApprove => "auto_edit".to_string(), | ||
| GooseMode::Chat => "plan".to_string(), |
There was a problem hiding this comment.
Preserve Gemini ACP mode IDs after the first turn
This mapping is only used during session/new. After a gemini-acp session exists, Agent::update_goose_mode() goes through AcpProvider::update_mode(), which sends mode.to_string().to_lowercase() (auto, approve, smart-approve, chat) in session/set_mode (crates/goose/src/acp/provider.rs:288-304). Gemini's mode IDs here are yolo, default, auto_edit, and plan, so any mid-session mode change will either be rejected by the agent or leave the old approval policy active. That is a real safety/usability regression for users who switch from Auto to Approve/Chat after the session has started.
Useful? React with 👍 / 👎.
| let resolved_command = SearchPaths::builder() | ||
| .with_npm() | ||
| .resolve(GEMINI_ACP_BINARY)?; |
There was a problem hiding this comment.
Respect the configured Gemini command for ACP startup
Unlike GeminiCliProvider::from_env() (crates/goose/src/providers/gemini_cli.rs:50-53), this always resolves the literal gemini binary and the new provider exposes no GEMINI_CLI_COMMAND config key in metadata(). In environments that already depend on a custom Gemini wrapper/path (for example desktop installs where Goose can only reach Gemini through a configured command), the deprecated gemini-cli provider still works but gemini-acp cannot be created, so migration to the new provider fails even with an otherwise valid setup.
Useful? React with 👍 / 👎.
Signed-off-by: Michael Neale <michael.neale@gmail.com>
codefromthecrypt
left a comment
There was a problem hiding this comment.
change looks good, I think we can decide to not deprecate and instead remove in another PR or remove in this. ether way is fine by me.
only main suggestion is to plumb it into crates/goose/tests/providers.rs and give it a run to make sure most things work.
Finally, the bot comments about looking up the provider's default mode etc, I would punt them for now. This affects all ACP providers and not terribly critical to do here,
| ./target/debug/goose run -t "say hello and nothing else" --no-profile | ||
|
|
||
| # Gemini ACP | ||
| GOOSE_PROVIDER=gemini-acp GOOSE_MODEL=default \ |
There was a problem hiding this comment.
maybe add a link to crates/goose/tests/providers.rs because we have more comprehensive there.
There was a problem hiding this comment.
yeah I will get rid of this doc - was just for me
| ### Debug logging | ||
|
|
||
| ```bash | ||
| RUST_LOG=debug GOOSE_PROVIDER=gemini-acp GOOSE_MODEL=default \ |
There was a problem hiding this comment.
in worst case RUST_BACKTRACE=full RUST_LOG=debug,sacp=trace and also maybe note the location of the logs.
e.g. something I'm working on now I did this
$ GOOSE_PROVIDER=claude-acp GOOSE_MODEL=default RUST_LOG=debug,sacp=trace target/release/goose run -t "say hello"
# After goose exits:
$ grep -h 'session/close' ~/.local/state/goose/logs/cli/*/*.log
# Expect: outgoing session/close request and successful responseThere was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 154898bddf
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…e for gpt-5.3-codex gpt-5.3-codex was flaky with tool calling — it would often respond conversationally instead of making tool calls. Adding a brief preamble to the instructions (use your tools, keep going, don't guess) fixes this reliably. Also adds gpt-5.4 (omni model) to the known models list. Signed-off-by: Michael Neale <michael.neale@gmail.com>
…ide from repo Change default from gpt-5.1-codex to gpt-5.3-codex as the recommended model for new chatgpt_codex setups. Remove ACP_PROVIDER_TESTING_GUIDE.md from tracked files (kept locally). Signed-off-by: Michael Neale <michael.neale@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d4cd6c4d0e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
… improve gemini-acp - Remove deprecated claude-code, codex, gemini-cli from providers.md table (Angie's feedback). They remain in code with deprecated descriptions for existing users. - gemini-acp: pass --model flag when model != 'default' so non-default model selection works (codex bot P2 feedback). - gemini-acp: respect GEMINI_CLI_COMMAND config for custom gemini paths, matching the deprecated gemini-cli provider (codex bot P2 feedback). - Add gemini-acp to crates/goose/tests/providers.rs (Adrian's feedback). Signed-off-by: Michael Neale <michael.neale@gmail.com>
Signed-off-by: Michael Neale <michael.neale@gmail.com>
Signed-off-by: Michael Neale <michael.neale@gmail.com>
Signed-off-by: Michael Neale <michael.neale@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 881d5081aa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| let provider_config = AcpProviderConfig { | ||
| command: resolved_command, | ||
| args, | ||
| env: vec![], | ||
| env_remove: vec![], |
There was a problem hiding this comment.
Preserve PATH enrichment when spawning Gemini ACP
In desktop installs where the app inherits a minimal PATH, the new provider can resolve the gemini wrapper but still fail to launch it. GeminiCliProvider::build_command() explicitly injects SearchPaths::builder().with_npm().path() before spawning for this reason, while spawn_acp_process() only inherits config.env; with env left empty here, npm/Homebrew locations (and the node interpreter used by many npm shims) are no longer added. That makes gemini-acp unusable in environments where the deprecated gemini-cli provider still works.
Useful? React with 👍 / 👎.
| pub const CHATGPT_CODEX_DEFAULT_MODEL: &str = "gpt-5.3-codex"; | ||
| pub const CHATGPT_CODEX_KNOWN_MODELS: &[&str] = &[ | ||
| "gpt-5.4", |
There was a problem hiding this comment.
Keep the ChatGPT Codex UI default aligned with the provider default
The desktop model switcher does not use default_model; it asks the backend for recommended models, then SwitchModelModal::findPreferredModel() falls back to the first returned entry when no regex matches. fetch_recommended_models() sorts ChatGPT models by release date, and the canonical registry dates gpt-5.4 after gpt-5.3-codex, so adding gpt-5.4 here makes the UI preselect gpt-5.4 whenever a user switches to chatgpt_codex. That silently diverges from the declared default gpt-5.3-codex and bypasses the new GPT-5.3-specific prompt tuning in create_codex_request().
Useful? React with 👍 / 👎.
* main: (22 commits) feat: add gemini-acp provider, update docs on subscription models + improvements to codex (#8000) fix(openai): use Responses API for gpt-5.4 (#7982) Remove lead/worker provider (#7989) chore(release): release version 1.28.0 (#7991) Fix empty tool results from resource content (e.g. auto visualiser) (#7866) Separate SSE streaming from POST work submission (#7834) fix: include token usage in Databricks streaming responses (#7959) Optimize tool summarization (#7938) fix: overwrite the deprecated googledrive extension config (#7974) refactor: remove unnecessary Arc<Mutex> from tool execution pipeline (#7979) Revert message flush & test (#7966) docs: add Remote Access section with Telegram Gateway documentation (#7955) fix: update webmcp blog post metadata image URL (#7967) fix: clean up OAuth token cache on provider deletion (#7908) fix: hard-coded tool call id in code mode callback (#7939) Fix SSE parsers to accept optional space after data: prefix (#7929) docs: add GOOSE_INPUT_LIMIT to config-files.md (#7961) Add WebMCP for Beginners blog post (#7957) Fix download manager (#7933) Improve the formatting of tool calls, show thinking, treat Reasoning and Thinking as the same thing (sorry Kant) (#7626) ...
…mprovements to codex (aaif-goose#8000) Signed-off-by: Michael Neale <michael.neale@gmail.com> Signed-off-by: esnyder <elijah.snyder1@gmail.com>
…mprovements to codex (aaif-goose#8000) Signed-off-by: Michael Neale <michael.neale@gmail.com> Signed-off-by: esnyder <elijah.snyder1@gmail.com>
Summary
Add an ACP provider for Google's Gemini CLI. Gemini CLI supports ACP natively via its
--acpflag, so no shim is needed (unlike claude-acp and codex-acp which use @zed-industries shims).Also fixes up codex for 5.3, and deprecates old CLI ones, documents. blog etc.
Changes
crates/goose/src/providers/gemini_acp.rs— New provider that spawnsgemini --acpover stdio, using the sharedAcpProviderinfrastructurecrates/goose/src/providers/mod.rs— Register the modulecrates/goose/src/providers/init.rs— Register in provider registryHow it works
Same pattern as
claude_acp.rsandcodex_acp.rs:geminibinary viaSearchPaths::builder().with_npm()--acparg to enable ACP modeTesting
Tested end-to-end alongside the other two ACP providers:
Prerequisites
Install Gemini CLI:
npm install -g @google/gemini-cliAuth: run
geminionce to authenticate via browser