Skip to content

Conversation

@mikehostetler
Copy link
Contributor

Problem

Google Gemini API supports url_context tool for grounding responses with web content, but ReqLLM didn't expose this.

Solution

Added google_url_context provider option that includes the url_context tool in requests.

Usage

ReqLLM.generate_text(model, prompt,
  provider_options: [google_url_context: true]
)

Can also pass a map with options:

ReqLLM.generate_text(model, prompt,
  provider_options: [google_url_context: %{some_option: "value"}]
)

Can be combined with google_grounding and user-defined tools.

Closes #226

Adds support for URL context grounding in Google provider, allowing
responses to be grounded with content from specific URLs.

Closes #226

Amp-Thread-ID: https://ampcode.com/threads/T-019c117b-7aa8-72ba-9556-23dc1118034f
Co-authored-by: Amp <[email protected]>
@mikehostetler mikehostetler merged commit bc57abf into main Jan 31, 2026
6 checks passed
@mikehostetler mikehostetler deleted the feat/226-google-url-context branch January 31, 2026 01:30
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.

[Feature]: Add support for url_context in Google provider context

2 participants