Is it possible to use google search and vertex ai search in gemini multi-tool?

Hello, with the Gemini API, we’re able to use multiple tools in one call, like Google Search and code execution.

Is it possible to use Vertex AI Search as a tool?

When I try to use it, I get a 404 error, and if I swap it out for the code execution tool, I get this error:

2025-04-18 02:30:28 - root - ERROR - Failed to generate response: 400 INVALID_ARGUMENT. {'error': {'code': 400, 'message': 'Code execution and search tool is not supported.', 'status': 'INVALID_ARGUMENT'}}.

So I can only use 1 at a time, and if I try to use Vertex AI on its own, I get a pydantic validation error.

How can I use multiple tools in one API call?

Code (simplified):

tools =[]

tools.append({'google_search': {}})

tools.append({'vertex_ai_search': {'datastore': vertex_datastore_path}}) # 404 error or pydantic validation error

tools.append({'code_execution': {}}) # 400 error if ran together with google search


chat = self.genai_client.chats.create(
                    model=MODEL_ID,
                    config=GenerateContentConfig(
                        system_instruction=PROMPT, 
                        tools=tools,
                        temperature=0.7,
                        top_p=0.9,
                        max_output_tokens=1024,
     ),
)

Hi @AIM,

I am just trying to replicate to the issue, can you help any basic prompt that you are trying to achieve that would be helpful.

Thank you