Skip to content

feat(go/plugins/googlegenai): polish Deep Research model support - #5472

Open
adesinah wants to merge 3 commits into
mainfrom
feat/deep-research-models
Open

adesinah wants to merge 3 commits into
mainfrom
feat/deep-research-models

Conversation

@adesinah

@adesinah adesinah commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor

Polishes Deep Research support in the Go googlegenai plugin and brings it to parity with the JS plugin.

  • Models: adds deep-research-preview-04-2026 and deep-research-max-preview-04-2026 (media and tools); deep-research-pro-preview-12-2025 is marked deprecated. Google AI only, so the Vertex plugin neither lists nor resolves them.
  • Background model bundle: start, check and cancel are registered together through ai.NewBackgroundModelAction, with a typed DeepResearchConfig and its own config schema.
  • Operation states: requires_action (plan awaiting approval) and incomplete (truncated) now finish the operation; unknown statuses finish with an error, and failures carry a proper status error. A cancel that reports CANCELLED counts as success.
  • Hardening: check and cancel no longer trust a base URL from the operation, so the API key can't be sent to another host. Operation IDs are validated, and responses are capped at 64 MiB. HTTP errors map to Genkit statuses (with RetryInfo) instead of echoing the raw body, and startTime survives a JSON round trip.
  • Request shape: modalities go in response_format (no deprecated response_modalities), and JSON schemas are cleaned before sending.
  • Known limit: a per-request apiKey in the config applies to the start call only.
  • Unit tests plus a live test, run with -deepresearch because a run takes minutes and uses preview quota.

Checklist (if applicable):

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for Google AI Deep Research models as background models in the googlegenai plugin. It introduces the ModelTypeDeepResearch type, handles action resolution (start, check, and cancel operations), maps interaction steps and usage metrics, and includes comprehensive unit and live integration tests. The review feedback suggests renaming a shadowed url variable to reqURL to avoid package name collision, and improving error handling in HTTP requests by falling back to resp.Status when the response body is empty.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread go/plugins/googlegenai/deep_research.go Resolved
Comment thread go/plugins/googlegenai/deep_research.go Resolved
@adesinah
adesinah force-pushed the feat/deep-research-models branch 2 times, most recently from 08a0bee to 9e8fb25 Compare June 5, 2026 11:59
Comment thread go/plugins/googlegenai/deep_research.go Resolved
@MichaelDoyle

Copy link
Copy Markdown
Contributor

@adesinah @apascal07 checking in on this PR (along with #5498 and #5508) — are we still planning to rebase this onto the current go/plugins/googlegenai structure, or close in favor of a fresh PR alongside Go Interactions support?

…TP and request shape

Finish requires_action/incomplete/unknown statuses, stop trusting baseUrl and
op.ID from caller-supplied operations, map errors to statuses, cap responses,
use response_format instead of response_modalities, and keep Deep Research
off the Vertex backend.
@adesinah
adesinah force-pushed the feat/deep-research-models branch from 9732480 to eb01531 Compare November 18, 2026 20:38

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants