Does Gemini's OpenAI-Compatible Endpoint Support Native Tools Like url_context?

Hi everyone,

I’m working with the Gemini API and trying to integrate it using the OpenAI-compatible endpoint (https://generativelanguage.googleapis.com/v1beta/openai/). I understand that it supports standard function calling (tool calls) in the OpenAI format, where I can define custom functions via the tools parameter.

However, I’m unclear on whether it also supports Gemini’s native tools, such as url_context for URL content retrieval, which is available in the native Gemini API (e.g., via the google-generativeai SDK).

From what I’ve read in the docs (https://ai.google.dev/gemini-api/docs/openai), it seems focused on function calling compatibility but doesn’t mention native tools. When I try to pass something like tools = [{"url_context": {}}] in the OpenAI SDK setup, it doesn’t seem to work as expected.

Has anyone successfully used Gemini’s built-in tools (like URL retrieval, Google Search grounding, or code execution) through the OpenAI-compatible endpoint? Or is this limited to custom function calls only, requiring a switch to the native API for those features?

Any insights, examples, or official clarifications would be greatly appreciated!

Hi Hatsunix,

welcome to the forum!!
Currently, the OpenAI-compatible endpoint does not support native tools like url_context.

We are continuing to work on improving OpenAI compatibility.