feat: support latest Gemini models - #10630
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 719e20495b
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "gemini-3.6-flash", | ||
| "gemini-3.5-flash", | ||
| "gemini-3.5-flash-lite", |
There was a problem hiding this comment.
Add canonical metadata for the new Gemini IDs
Adding these IDs only to GOOGLE_KNOWN_MODELS leaves gemini-3.6-flash and gemini-3.5-flash-lite absent from crates/goose-provider-types/src/canonical/data (checked with rg). The ACP inventory refresh stores fetch_recommended_models, which filters Google's live model list through map_to_canonical_model and returns that non-empty filtered list, so these GA models are dropped from the UI/model inventory; manual selection also falls back to the default 128k context instead of the 1M/64k limits Google documents at https://ai.google.dev/gemini-api/docs/latest-model#new-models. Please add the matching canonical entries/mappings with limits.
Useful? React with 👍 / 👎.
| fn build_function_response_part(id: &str, name: &str, text: String) -> Map<String, Value> { | ||
| let mut part = Map::new(); | ||
| let mut function_response = Map::new(); | ||
| function_response.insert("id".to_string(), json!(id)); |
There was a problem hiding this comment.
Update formatter tests for function response ids
This unconditional id changes payloads for every functionResponse, but existing tests such as test_message_to_google_spec_tool_result_multiple_texts and test_response_to_message_with_empty_content still expect no id; I ran both targeted cargo test -p goose-provider-types ... -- --exact cases and they fail on this assertion. Unless those expectations are updated with the new field, CI will block the change even though the formatter behavior is intentional.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd62d62240
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "gemini-3.6-flash", | ||
| "gemini-3.5-flash", | ||
| "gemini-3.5-flash-lite", |
There was a problem hiding this comment.
Keep image tool results inside functionResponse
When these newly advertised Gemini 3.x models handle a tool result that contains an image, format_messages still emits the RawContent::Image as a sibling inline_data part before adding a text-only functionResponse. Google's latest Gemini guidance requires multimodal tool assets to be placed inside the function response payload (https://ai.google.dev/gemini-api/docs/latest-model#api-changes-and-parameter-updates), so MCP/browser/screenshot-style tools can be rejected or lose the image context under the new models unless the formatter is updated before listing them as supported.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 65489e2599
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ThinkingLevel::Low | ||
| } | ||
| ThinkingEffort::Off | ThinkingEffort::Low => ThinkingLevel::Low, | ||
| ThinkingEffort::Medium => ThinkingLevel::Medium, |
There was a problem hiding this comment.
Keep Pro preview from receiving medium thinking
When gemini-3-pro-preview is used with Goose's Medium thinking effort, this generic Gemini 3 mapping now serializes thinkingLevel: "medium"; Google's thinking-level table for Generate Content lists Pro preview as supporting only low and high (https://ai.google.dev/gemini-api/docs/generate-content/thinking), so those requests are rejected even though the previous fallback to low worked. Please gate Medium to the Flash/3.1 families that support it, or keep the old Low fallback for Pro preview.
Useful? React with 👍 / 👎.
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
…t branch # Conflicts: # crates/goose-provider-types/src/formats/google.rs
Layer on top of the aaif-goose#10630 Gemini media pipeline: in addition to RawContent::Image, forward BlobResourceContents that carry a MIME type as inline media (nested functionResponse.parts on Gemini 3, sibling inline_data on 2.x). Use extract_text_from_resource for non-media resources so text blobs that omit a MIME type are preserved instead of dropped by get_text().
* origin/main: (24 commits) upgrade to rmcp 2.0 (#10584) chore: opus5 support (including adaptive thinking) (#10686) fix(desktop): use shell working directory on initial launch (#10655) fix(providers): enable inventory refresh for OpenRouter model picker (#10641) Add configurable GOOSE_DOCS_ROOT for air-gapped docs access (#10294) fix(i18n): fix Korean translation errors, untranslated entries, and terminology consistency (#10667) fix(acp): preserve read lines and reload tool output (#10662) fix(acp): surface tool call output in CLI and Desktop (#10654) fix overlong function names in provider requests (#10659) fix (desktop): preserve ACP tool call update fields (#10653) feat: support latest Gemini models (#10630) Merge commit from fork feat (acp): Gate tool-call label enrichment on ACP client capability (#10644) fix(session): use configured session manager for tool summaries (#10628) refactor (acp): simplify ACP tool-call handling and fix chain summaries (#10599) fix: omit disabled OpenRouter reasoning (#10517) enhance the uniffi API layer (#10427) remove sampling from smoke test (#10639) rebuild canonical model db (#10633) fix(ui): clear stale pending ACP connection after terminal recovery failure (#10552) ... # Conflicts: # ui/desktop/src/i18n/messages/ko.json
Summary
Testing
cargo fmt --allgit diff --check