How to enable/disable URL context and google search grounding when using OpenAI compatible API?

Hi. Is there any method for enabling/disabling URL context tool and grounding with google search tool when using OpenAI compatible API?

When I using OpenAI compatible API, gemini says like that “I searched it by using google ~~” even I did not specifiy any tools for web browsing and google search. Is it enabled by default?

Thanks.

What model are you using? Grounding is not enabled by default in OpenAI-compatible API endpoint.
Could you share a code sample so I can try to reproduce it?

Thanks

Hi. Model what I used is gemini-2.5-flash. I used OpenAI .NET SDK + Microsoft.Extensions.AI and gemini’s OpenAI compatible endpoint. I provided time tool to model and requested today’s weather info and gemini respond “Today (yyyy-MM-dd, correct current date is shown on actual response)'s weather is ~~~, I searched it by using google ~~~”.

If it is not enabled by default, I think this is simple hallucination.

It could be the time tool causing this. Have you tried using the pro model to check if it behaves differently?