feat: support Gemini URL Context - #4349
Merged
Merged
Conversation
dgageot
marked this pull request as ready for review
September 17, 2026 17:05
dgageot
force-pushed
the
feat/gemini-url-context
branch
from
September 18, 2026 08:18
78e95db to
45e5f17
Compare
Collaborator
|
👋 This PR has merge conflicts with the base branch. Please rebase or merge the latest base branch and resolve them. I've moved it to draft and added |
dgageot
force-pushed
the
feat/gemini-url-context
branch
from
September 18, 2026 10:10
45e5f17 to
81df0da
Compare
gtardif
previously approved these changes
Sep 18, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Sep 18, 2026
dgageot
force-pushed
the
feat/gemini-url-context
branch
from
September 18, 2026 11:10
81df0da to
0307821
Compare
aheritier
previously approved these changes
Sep 18, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Sep 18, 2026
Built-in toggle via config, diagnostics/classification wiring, tests, schema update, docs and example. Assisted-By: Docker AI Agent Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david@gageot.net> Assisted-By: Claude
…overy Signed-off-by: David Gageot <david@gageot.net> Assisted-By: Claude
dgageot
force-pushed
the
feat/gemini-url-context
branch
from
September 18, 2026 12:15
0307821 to
7774014
Compare
gtardif
approved these changes
Sep 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gemini exposes a
url_contextbuilt-in tool that lets the model fetch and reason over public URLs at inference time. This adds opt-in support for it behind aprovider_opts.url_context: trueflag, consistent with the existinggoogle_search,google_maps, andcode_executiontoggles.The change wires
url_contextintobuiltInTools()in the Gemini client, extends diagnostics and error classification to cover responses that reference the new tool, and adds test coverage for direct, gateway, and Vertex routing paths — including disabled and malformed cases, and scenarios that mix built-in tools with custom function declarations.One pre-existing SDK restriction is documented but not fixed here: on Vertex AI, mixing built-in tools (including
url_context) with custom function-call tools is unsupported by the underlying SDK. The combination is tested and the error is classified correctly, but callers must avoid it until the SDK lifts the restriction. The schema, docs for the Google provider, and a runnableexamples/gemini_url_context.yamlare all updated.Rebased onto
main(2e0650eb3), preserving the embedding schema additions. Example-loading tests now use a local DMR HTTP stub instead of depending on a running Docker Model Runner, and the URL Context docs pass Markdown lint.Validation:
task build,task test,task lint,markdownlint-cli2@0.22.1, and race tests forpkg/model/provider/gemini,pkg/config, andpkg/teamloaderall pass locally. No live paid API calls were made.