[Feature]: Python Google provider's execute_tool_call / handle_response don't accept a session
Area of Improvement
Python SDK
Feature Name
Session-aware execute_tool_call / handle_response for the Python Google provider (composio_google)
Describe the Feature
GoogleProvider.execute_tool_call and GoogleProvider.handle_response (python/providers/google/composio_google/provider.py) only accept user_id and always execute through the direct path (self.execute_tool(..., user_id=user_id)).
#4098 added an optional session execution target to the non-agentic Python helpers (python/composio/core/provider/base.py execute_tool_for_target, plus the OpenAI and Anthropic providers), but composio_google did not get the equivalent.
The package README quickstart (python/providers/google/README.md) fetches tools with session.tools() and then executes the model's calls with:
results = composio.provider.handle_response(user_id="user_123", response=response)That sends session tools, including session meta tools such as COMPOSIO_SEARCH_TOOLS, through the user-ID path, which the provider docs say does not carry the session.
Use Case / Motivation
Developers using the Vertex AI SDK with composio-google and Tool Router sessions have no provider helper that keeps the session. The TypeScript side of this gap is #4571 (PR #4572). This is the Python counterpart.
Proposed Solution or API Design (Optional)
Mirror composio_anthropic:
- Add an optional
sessionargument toexecute_tool_callandhandle_response, routed throughexecute_tool_for_target, keepinguser_idworking for direct tools - Reject direct-only options, such as
modifiers, when the target is a session, matching the existing helpers - Update the README quickstart to pass the session
- Add tests for both the
user_idandsessionpaths
Who does this impact?
- Developers using the SDK
- AI Agent frameworks (LangChain, OpenAI, etc.)
Related Issues / References
#4571, #4572, #4098
Would you like to contribute to this feature?
- Yes, I can help implement it
Source: ComposioHQ/composio