Skip to content

feat: support latest Gemini models - #10630

Merged
jamadeo merged 6 commits into
mainfrom
codex/gemini-latest-models
Jul 23, 2026
Merged

feat: support latest Gemini models#10630
jamadeo merged 6 commits into
mainfrom
codex/gemini-latest-models

Conversation

@DOsinga

@DOsinga DOsinga commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add Gemini 3.6 Flash, Gemini 3.5 Flash, and Gemini 3.5 Flash-Lite to the Google provider catalog
  • apply Gemini 3.x request requirements for sampling and thinking levels
  • preserve function call IDs and return matching function response IDs and names
  • add the new models to the provider smoke test matrix

Testing

  • Google provider smoke tests for Gemini 3.6 Flash and Gemini 3.5 Flash-Lite
  • cargo fmt --all
  • git diff --check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +29 to +31
"gemini-3.6-flash",
"gemini-3.5-flash",
"gemini-3.5-flash-lite",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +29 to +31
"gemini-3.6-flash",
"gemini-3.5-flash",
"gemini-3.5-flash-lite",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@jamadeo
jamadeo added this pull request to the merge queue Jul 23, 2026
Merged via the queue into main with commit d17d65f Jul 23, 2026
26 checks passed
@jamadeo
jamadeo deleted the codex/gemini-latest-models branch July 23, 2026 16:17
jamadeo pushed a commit that referenced this pull request Jul 23, 2026
Co-authored-by: Douwe M Osinga <douwe@sidewalklabs.com>
thinkmore-eric added a commit to thinkmoresecure/goose that referenced this pull request Jul 23, 2026
…t branch

# Conflicts:
#	crates/goose-provider-types/src/formats/google.rs
thinkmore-eric added a commit to thinkmoresecure/goose that referenced this pull request Jul 23, 2026
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().
alexhancock added a commit that referenced this pull request Jul 27, 2026
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants