danielfrey2280
09/01/2025, 11:44 AMts
const tools = await composio.tools.get(entityId, { toolkits: apps });
const model = llm.bind({ tools });
await model.invoke("test");
Observe 400 from the Google Generative Language API.
Actual
400 Bad Request with paths like:
Unknown name "type" at ... parameters.properties[...].any_of[0]
Example offending schema
SLACKBOT_CREATE_CHANNEL parameters include:
json
{
"is_private": { "anyOf": [ { "type": ["boolean","null"] }, { "type": "null" } ] },
"team_id": { "anyOf": [ { "type": ["string","null"] }, { "type": "null" } ] }
}
Expected
Composio should emit Gemini-compatible tool schemas or provide a compatibility option to normalize schemas for Google function_declarations.
Impact
Blocks using Composio tools with Gemini 2.x, notably Slack toolkit.
Suggested fix
Remove anyOf/oneOf/allOf, or collapse [T, null] to T
Rewrite ["string","null"] to "string"
Strip default, $ref, $defs, definitions, additionalProperties
Ensure object has properties and array has items
Workaround
Filter or sanitize tool schemas before binding to Gemini (drop unions, convert nullable multi-type to a single type, remove unsupported keys).danielfrey2280
09/01/2025, 11:45 AMUday
09/01/2025, 1:15 PMComposio Support Agent
09/01/2025, 1:21 PMComposio Support Agent
09/01/2025, 1:52 PMdanielfrey2280
09/05/2025, 3:29 PMComposio Support Agent
09/05/2025, 4:46 PM