The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated (UTC) |
|---|---|---|---|
| docs | Jun 8, 2026 7:48pm |
Models — and some MCP transports — occasionally emit tool-call arguments as a JSON string instead of an object/dict. The most visible trigger is COMPOSIO_MULTI_EXECUTE_TOOL on the Vercel AI SDK, where streaming fails with:
messages.3.content.1.tool_use.input: Input should be a valid dictionary
Until now only a handful of providers guarded against this, each with its own slightly different inline check, leaving most providers vulnerable and behaviour inconsistent across the SDK.
This PR centralizes the coercion into one helper per language and routes every provider through it, in both the TypeScript and Python SDKs.
Closes https://github.com/ComposioHQ/composio/issues/2406
TypeScript — new normalizeToolArguments in @composio/core (exported), used by every provider:
vercel, cloudflare, openai-agents, openai (ChatCompletions + Responses), anthropic, google, langchain, llamaindex, claude-agent-sdk, mastra.
Python — new normalize_tool_arguments in composio.utils.shared, used by every provider:
openai, openai-responses, anthropic, google, langchain, langgraph, crewai, autogen, llamaindex, gemini, google-adk, openai-agents, claude-agent-sdk.
Shared semantics (identical in both languages):
| Input | Result |
|---|---|
| object / dict | returned unchanged |
| JSON string | parsed to object |
| empty / whitespace string | {} |
null / undefined / None | {} |
| array, primitive, unparseable string, JSON that isn't an object | typed error (ComposioInvalidToolArgumentsError / InvalidParams) with the original parse error as cause |
The typed error replaces the previous grab-bag of behaviours: a raw SyntaxError/JSONDecodeError, or — worse — silently forwarding a malformed string downstream.
This consolidates and extends three open PRs that each addressed a slice of the problem inconsistently. Their authors are credited as co-authors on the relevant commits:
input_parameters / missing-description handling and the gemini → google_adk provider-name fix are folded in here.Compared to the three combined, this PR additionally: covers every provider in both SDKs (not a subset of one), defines a single source of truth instead of per-provider snippets, normalizes empty/null payloads to {}, and raises an actionable typed error instead of leaking SyntaxError or forwarding a bad string.
{}, malformed/non-object → typed error).@composio/core + touched-provider TS suites pass; typecheck and lint clean. Python ruff clean and new test green.Patch bump for all affected TypeScript packages (@composio/core + the providers). Python follows its own versioning, so no changeset there.
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated (UTC) |
|---|---|---|---|
| docs | Jun 8, 2026 7:48pm |