[Critical] File Upload/Download Fixes for latest tool with anyOf, oneOf, and allOf Schemas

Version Information

TypeScript/JavaScript

  • Package: @composio/core and provider packages
  • Version: 0.5.3+

Python

  • Package: composio and provider packages
  • Version: 0.10.8+

The file handling modifiers now properly handle file_uploadable and file_downloadable properties nested within anyOf, oneOf, and allOf JSON Schema declarations. Previously, only direct child properties (and partial allOf support) were detected for file upload/download transformations.

We recommend updating to version 0.5.3 (TypeScript) or 0.10.8 (Python) or later to ensure file uploads and downloads work correctly with tools that use union or intersection types in their schemas.

What Changed

Before (Bug)

File properties inside anyOf, oneOf, or allOf were not detected:

1// This schema's file_uploadable was NOT being processed
2inputParameters: {
3 type: 'object',
4 properties: {
5 fileInput: {
6 anyOf: [
7 {
8 type: 'string',
9 file_uploadable: true // ❌ Not detected
10 },
11 {
12 type: 'null'
13 }
14 ]
15 }
16 }
17}

After (Fixed)

File properties are now correctly detected and processed at any nesting level:

1// Now properly detected and transformed
2inputParameters: {
3 type: 'object',
4 properties: {
5 fileInput: {
6 anyOf: [
7 {
8 type: 'string',
9 file_uploadable: true // ✅ Detected and processed
10 },
11 {
12 type: 'null'
13 }
14 ]
15 }
16 }
17}

Affected Scenarios

ScenarioBeforeAfter
file_uploadable in anyOfNot detected✅ Works
file_uploadable in oneOfNot detected✅ Works
file_uploadable in allOfNot detected✅ Works
file_downloadable in anyOfNot detected✅ Works
file_downloadable in oneOfNot detected✅ Works
file_downloadable in allOfNot detected✅ Works
Nested objects inside union typesNot detected✅ Works
Array items with union typesNot detected✅ Works

How to Update

TypeScript/JavaScript

$npm update @composio/core@latest

Python

$pip install --upgrade composio

Backward Compatibility

This release is fully backward compatible:

  • All existing code continues to work without modifications
  • No migration required
  • File upload/download for direct properties continues to work as before
  • The fix only adds support for previously unsupported schema patterns

Impact Summary

ChangeRuntime BreakingTypeScript BreakingMigration Required
anyOf support for file uploadsNoNoNo
oneOf support for file uploadsNoNoNo
allOf support for file uploadsNoNoNo
anyOf support for file downloadsNoNoNo
oneOf support for file downloadsNoNoNo
allOf support for file downloadsNoNoNo