Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 11:00 UTC
feat(providers): accept a Tool Router session in all provider helpers (#4675)
This PR: - closes https://github.com/ComposioHQ/composio/issues/4571 and https://github.com/ComposioHQ/composio/issues/4660 - adds a session overload to the TS Google and Cloudflare `executeToolCall` and to OpenAI Responses `handleResponse`, completing the rollout from https://github.com/ComposioHQ/composio/pull/4098 - adds `session=` to the Python Google `execute_tool_call` and `handle_response` - keeps user-ID calls on the original `executeTool` path: the Google/Cloudflare peer ranges admit `@composio/core` releases that predate `executeToolForTarget`, so only session calls need core ≥ 0.17.0 - makes the Cloudflare `options` argument optional (widening only; existing calls still type-check) - fixes the Google (TS and Python) and Cloudflare README quickstarts, which paired `session.tools()` with a user-ID helper, so session meta-tools failed - updates `google.mdx` and the LLM guardrail notes, and extends the docs session check to catch `handleResponse`/`handle_response` bound to a user ID - supersedes https://github.com/ComposioHQ/composio/pull/4572 and https://github.com/ComposioHQ/composio/pull/4661; thanks to their authors for the reports and the matching approach ## Testing - `vitest run` in google (19), cloudflare (17), openai (40), anthropic (49), typesafe (117) — all pass; new tests cover session routing, session error results, option rejection, and user-ID calls on a core without `executeToolForTarget` - `pytest tests/test_google_provider.py` (6 pass); ruff with `config/ruff.toml` and mypy clean on the changed files - docs: `bun test` on `session-execution`, `execute-version`, `api-version-markdown`, `llms-openapi` — all pass OpenAI Assistants helpers (`handleAssistantMessage`, `handle_assistant_tool_calls`) stay user-ID only: deprecated, and the Assistants API is sunset.