#4633·composio

[Feature]: Cloudflare provider's executeToolCall doesn't accept a session

Author: nikhil008-gitCreated Sep 24, 2026Updated Sep 26, 2026
Labelsts

Area of Improvement

TypeScript / Node.js SDK

Feature Name

Session-aware executeToolCall for the Cloudflare provider (@composio/cloudflare)

Describe the Feature

CloudflareProvider.executeToolCall (ts/packages/providers/cloudflare/src/index.ts:229) only accepts (userId, tool, options, modifiers) and always executes through the direct path.

#4098 added a session overload to the OpenAI and Anthropic providers, routed through executeToolForTarget on BaseProvider (ts/packages/core/src/provider/BaseProvider.ts). #4571 (PR #4572) does the same for the Google provider. The Cloudflare provider has the same gap.

The package README (ts/packages/providers/cloudflare/README.md) fetches tools with session.tools() and then executes them with:

typescript
results.push(await composio.provider.executeToolCall('user_123', toolCall, {}));

That sends session tools, including session meta tools such as COMPOSIO_SEARCH_TOOLS, through the user-ID path, which does not carry the session.

Use Case / Motivation

Developers using Workers AI with Tool Router sessions have no provider helper that keeps the session, unlike the OpenAI, Anthropic and (soon) Google providers.

Proposed Solution or API Design (Optional)

Mirror the Anthropic provider:

  • Add an executeToolCall(session: ToolCallSession, tool) overload routed through executeToolForTarget, keeping the existing userId overload
  • Reject direct-only options and modifiers when the target is a session
  • Update the README example to pass the session
  • Add tests for both overloads, plus a changeset

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