Gemini Manual Function Calling Runs as the Right User
With Automatic Function Calling turned off,GeminiProvider.handle_response(response) in composio-gemini executed each function call with the executor stored by the latest tools.get() or session.tools() for that tool. When one Composio instance served several users, a call from Alice’s conversation could run with Bob’s user_id and connected account, and Bob’s result went back into Alice’s chat. The callables used by Automatic Function Calling were not affected.
Bug Fixes
- Gemini (
composio-gemini):handle_responseacceptsuser_id=orsession=, with the same names asGoogleProvider.handle_responseincomposio-google. Each call runs exactly as the tool fetched for that user or Tool Router session would: validated against the schema from that fetch (including its schema modifiers), with the modifiers given totools.get(), and through the session’s routing, so local custom tools in aCOMPOSIO_MULTI_EXECUTE_TOOLbatch run in process. - Without a user or session,
handle_responsekeeps working for a process that has fetched tools for a single user or session. Once the provider has wrapped tools for more than one, it raises aValueErrorinstead of picking one, and executes nothing.