-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat: add gemini-acp provider, update docs on subscription models + improvements to codex #8000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8ddd290
246bf15
d1eda89
154898b
4737909
d4cd6c4
0ef55a0
2312161
64e7714
881d508
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| use anyhow::Result; | ||
| use futures::future::BoxFuture; | ||
| use std::path::PathBuf; | ||
|
|
||
| use crate::acp::{ | ||
| extension_configs_to_mcp_servers, AcpProvider, AcpProviderConfig, PermissionMapping, | ||
| }; | ||
| use crate::config::search_path::SearchPaths; | ||
| use crate::config::{Config, GooseMode}; | ||
| use crate::model::ModelConfig; | ||
| use crate::providers::base::{ProviderDef, ProviderMetadata}; | ||
|
|
||
| const GEMINI_ACP_PROVIDER_NAME: &str = "gemini-acp"; | ||
| pub const GEMINI_ACP_DEFAULT_MODEL: &str = "default"; | ||
| const GEMINI_ACP_DOC_URL: &str = "https://github.com/google-gemini/gemini-cli"; | ||
|
|
||
| pub struct GeminiAcpProvider; | ||
|
|
||
| impl ProviderDef for GeminiAcpProvider { | ||
| type Provider = AcpProvider; | ||
|
|
||
| fn metadata() -> ProviderMetadata { | ||
| ProviderMetadata::new( | ||
| GEMINI_ACP_PROVIDER_NAME, | ||
| "Gemini CLI (ACP)", | ||
| "ACP provider for Google's Gemini CLI. Install: npm install -g @google/gemini-cli", | ||
| GEMINI_ACP_DEFAULT_MODEL, | ||
| vec![], | ||
| GEMINI_ACP_DOC_URL, | ||
| vec![], | ||
| ) | ||
| } | ||
|
|
||
| fn from_env( | ||
| model: ModelConfig, | ||
| extensions: Vec<crate::config::ExtensionConfig>, | ||
| ) -> BoxFuture<'static, Result<AcpProvider>> { | ||
| Box::pin(async move { | ||
| let config = Config::global(); | ||
| let command_name: String = config.get_gemini_cli_command().unwrap_or_default().into(); | ||
| let resolved_command = SearchPaths::builder().with_npm().resolve(&command_name)?; | ||
| let goose_mode = config.get_goose_mode().unwrap_or(GooseMode::Auto); | ||
|
|
||
| let permission_mapping = PermissionMapping { | ||
| allow_option_id: Some("allow".to_string()), | ||
| reject_option_id: Some("reject".to_string()), | ||
| rejected_tool_status: sacp::schema::ToolCallStatus::Failed, | ||
| }; | ||
|
|
||
| let mut args = vec!["--acp".to_string()]; | ||
| if model.model_name != "default" { | ||
| args.push("--model".to_string()); | ||
| args.push(model.model_name.clone()); | ||
| } | ||
|
|
||
| let provider_config = AcpProviderConfig { | ||
| command: resolved_command, | ||
| args, | ||
| env: vec![], | ||
|
Comment on lines
+56
to
+59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Unlike the existing Useful? React with 👍 / 👎. |
||
| env_remove: vec![], | ||
|
Comment on lines
+56
to
+60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In desktop installs where the app inherits a minimal Useful? React with 👍 / 👎. |
||
| 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This freezes Useful? React with 👍 / 👎. |
||
| permission_mapping, | ||
| notification_callback: None, | ||
| }; | ||
|
|
||
| let metadata = Self::metadata(); | ||
| AcpProvider::connect(metadata.name, model, goose_mode, provider_config).await | ||
| }) | ||
| } | ||
| } | ||
|
|
||
| fn map_goose_mode(goose_mode: GooseMode) -> String { | ||
| match goose_mode { | ||
| GooseMode::Auto => "yolo".to_string(), | ||
| GooseMode::Approve => "default".to_string(), | ||
| GooseMode::SmartApprove => "auto_edit".to_string(), | ||
| GooseMode::Chat => "plan".to_string(), | ||
|
Comment on lines
+76
to
+79
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This mapping is only used during Useful? React with 👍 / 👎.
michaelneale marked this conversation as resolved.
|
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| --- | ||
| title: "Use Goose with Your AI Subscription" | ||
| description: "A quick update on using subscriptions for claude, gemini and codex" | ||
| authors: | ||
| - mic | ||
| --- | ||
|
|
||
| You can use your subscriptions for codex, claude and gemini now with goose, thanks to ACP! (Agent Client Protocol). | ||
| Codex is also special in that you can login directly to chatgpt - nothing else needs to be installed. | ||
|
|
||
| Gemini natively supports ACP, so it now works with a gemini acp provider in goose. At the time of writing, claude requires just one utility installed just once. | ||
|
|
||
| <!--truncate--> | ||
|
|
||
| ## Why subscriptions? | ||
|
|
||
| Well you can use what you already pay for. Obviously! and sessions and so on are still in goose. | ||
| ACP gives a deeper connection to these agents than using the CLI as providers. In this world - you can think of this as a stack of agents: | ||
| goose plugs into gemini via ACP (and other things, clients could plug in to goose!) but gemini (and also claude code) also act as an agent loop somewhat. | ||
| With ACP you are using the tools that are (mostly) in the underlying agent. Codex, however, is a full power LLM api, so you can use extensions natively in goose for that one. | ||
|
|
||
| ## Claude Code — via ACP | ||
|
|
||
| If you have a Claude Code subscription, you can use it through goose via the [Agent Client Protocol (ACP)](https://agentclientprotocol.com/). This requires installing a small adapter package: | ||
|
|
||
| ```bash | ||
| npm install -g @zed-industries/claude-agent-acp | ||
| ``` | ||
|
|
||
| Then configure goose to use it via the claude acp extension (CLI or GUI) | ||
|
|
||
|
|
||
| Or set it via environment variables: | ||
|
|
||
| ```bash | ||
| export GOOSE_PROVIDER=claude-acp | ||
| goose | ||
| ``` | ||
|
|
||
| goose passes your MCP extensions through to Claude via ACP, so any custom MCP servers you've configured in goose are available to the agent. | ||
|
|
||
| ## ChatGPT — sign in with your account | ||
|
|
||
| If you have ChatGPT Plus or Pro, the `chatgpt_codex` provider lets you use goose with your existing account. Just pick ChatGPT when you are setting up the goose app for the first time (or changing to that provider) | ||
|
|
||
| The first time you run it, goose will open a browser window for you to sign in with your ChatGPT account. After that, your session is cached locally. | ||
|
|
||
| The recommended model is `gpt-5.3-codex`, which is the default. You can also select `gpt-5.4` (OpenAI's latest omni model) or `gpt-5.2-codex` from the model picker. | ||
|
|
||
| ## Gemini — via ACP (native) | ||
|
|
||
| If you have a Google account with Gemini access, the Gemini CLI speaks ACP natively — no separate adapter needed. Just install the Gemini CLI itself: | ||
|
|
||
| ```bash | ||
| npm install -g @google/gemini-cli | ||
| ``` | ||
|
|
||
| ... and run `gemini` at least once. | ||
|
|
||
| On first run, Gemini CLI will ask you to authenticate with your Google account. After that, goose passes your extensions directly through to Gemini via ACP. | ||
|
|
||
| ## What about the old CLI providers? | ||
|
|
||
| Goose previously supported `claude-code`, `codex`, and `gemini-cli` as "pass-through" CLI providers. These will be removed soon as ACP is the future! | ||
|
|
||
| ## Quick reference | ||
|
|
||
| | Subscription | Provider | Install | Extensions | | ||
| |---|---|---|---| | ||
| | Claude Code | `claude-acp` | `npm install -g @zed-industries/claude-agent-acp` | ✅ via MCP | | ||
| | ChatGPT Plus/Pro | `chatgpt_codex` | Nothing — OAuth sign-in | ✅ via MCP | | ||
| | Gemini | `gemini-acp` | `npm install -g @google/gemini-cli` | ✅ via MCP | | ||
|
|
||
| Pick the one that matches what you're already paying for, and you're good to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The desktop model switcher does not use
default_model; it asks the backend for recommended models, thenSwitchModelModal::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 datesgpt-5.4aftergpt-5.3-codex, so addinggpt-5.4here makes the UI preselectgpt-5.4whenever a user switches tochatgpt_codex. That silently diverges from the declared defaultgpt-5.3-codexand bypasses the new GPT-5.3-specific prompt tuning increate_codex_request().Useful? React with 👍 / 👎.