Skip to content

Conversation

@hustxiayang
Copy link
Contributor

Description

This is to enable feature Web Grounding for Enterprise: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/grounding/web-grounding-enterprise

Related Issues/PRs (if applicable)
#1417

@hustxiayang hustxiayang requested a review from a team as a code owner November 10, 2025 17:21
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Nov 10, 2025
@hustxiayang hustxiayang marked this pull request as draft November 10, 2025 17:31
@hustxiayang hustxiayang marked this pull request as ready for review November 10, 2025 19:09
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Nov 10, 2025
@hustxiayang hustxiayang marked this pull request as draft November 10, 2025 19:12
@hustxiayang hustxiayang marked this pull request as ready for review November 10, 2025 19:12
@codecov-commenter
Copy link

codecov-commenter commented Nov 10, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.01%. Comparing base (96a2fdd) to head (a451f7d).

Files with missing lines Patch % Lines
internal/translator/gemini_helper.go 0.00% 3 Missing and 1 partial ⚠️

❌ Your patch status has failed because the patch coverage (50.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1526      +/-   ##
==========================================
- Coverage   84.03%   84.01%   -0.03%     
==========================================
  Files         141      141              
  Lines       13039    13047       +8     
==========================================
+ Hits        10957    10961       +4     
- Misses       1460     1463       +3     
- Partials      622      623       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hustxiayang hustxiayang marked this pull request as draft November 10, 2025 19:15
@hustxiayang hustxiayang marked this pull request as ready for review November 20, 2025 16:22
@hustxiayang hustxiayang marked this pull request as draft November 20, 2025 16:38
@hustxiayang
Copy link
Contributor Author

/retest

1 similar comment
@hustxiayang
Copy link
Contributor Author

/retest

@hustxiayang hustxiayang marked this pull request as ready for review November 21, 2025 04:15
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Nov 21, 2025
yuzisun pushed a commit that referenced this pull request Nov 21, 2025
#1554)

**Description**
Some new features were introduced in gemini3:
**1 thinking_level:**

https://ai.google.dev/gemini-api/docs/gemini-3?thinking=low#thinking_level
This is similar to reasoning_effort of openai, thus, unified them.

**2 media_resolution**

https://ai.google.dev/gemini-api/docs/gemini-3?thinking=low#media_resolution
This is similar to detail in openai, thus, unified them.

The difference is that openai does not provide a global config of
media_resolution. Thus, added it as gcp specific, but still use detail
to make the name consistent.

**Some related PRs:**
thinking_budget is in
#1461
thinking_level and thinking_budget are both supported, but can not use
them together.

Other features under review:
**1 web search:**
#1526

**2 parse the thought summary:**
#1521

---------

Signed-off-by: yxia216 <[email protected]>
Signed-off-by: Alexa Griffith <[email protected]>
Signed-off-by: Sukumar Gaonkar <[email protected]>
Co-authored-by: Alexa Griffith <[email protected]>
Co-authored-by: Sukumar Gaonkar <[email protected]>
Co-authored-by: Ignasi Barrera <[email protected]>
@mathetake
Copy link
Member

This needs a documentation update: https://aigateway.envoyproxy.io/docs/capabilities/llm-integrations/vendor-specific-fields (could you also backfill the doc for other fields added recently that lack docs if any?)


// EnterpriseWebSearch controls whether to use Web Grounding for Enterprise
// https://docs.cloud.google.com/vertex-ai/generative-ai/docs/grounding/web-grounding-enterprise
EnterpriseWebSearch bool `json:"enterprise_search,omitzero"`
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a list of supported tools, I think we should define a list here
https://github.com/googleapis/go-genai/blob/6a8184fcaf8bf15f0c566616a7b356560309be9b/types.go#L3934

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

see how litellm supports the web search tool, I think we can extend the openai tool type?
https://docs.litellm.ai/docs/providers/vertex#enterprise-web-search

Copy link
Contributor

Choose a reason for hiding this comment

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

const (
	ToolTypeFunction        ToolType = "function"
	ToolTypeImageGeneration ToolType = "image_generation"
	ToolTypeEnterpriseWebSearch = "enterprise_search"
)

type Tool struct {
	Type     ToolType            `json:"type"`
	Function *FunctionDefinition `json:"function,omitempty"`
}

Signed-off-by: yxia216 <[email protected]>
Signed-off-by: yxia216 <[email protected]>
Signed-off-by: yxia216 <[email protected]>
Signed-off-by: yxia216 <[email protected]>
Signed-off-by: yxia216 <[email protected]>
Signed-off-by: yxia216 <[email protected]>
Signed-off-by: yxia216 <[email protected]>
@hustxiayang
Copy link
Contributor Author

This needs a documentation update: https://aigateway.envoyproxy.io/docs/capabilities/llm-integrations/vendor-specific-fields (could you also backfill the doc for other fields added recently that lack docs if any?)

@mathetake Thanks a lot for your comment! @yuzisun started a pr #1590, so I left a comment about recent changes under that pr.

@hustxiayang
Copy link
Contributor Author

/retest

2 similar comments
@hustxiayang
Copy link
Contributor Author

/retest

@hustxiayang
Copy link
Contributor Author

/retest

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

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants