Commit Graph

77 Commits

Author SHA1 Message Date
Maxwell Calkin eb00a096dc fix: use .get() for schema type/title access in pydantic_model_from_param_schema
Schemas for nested objects may use anyOf/allOf/oneOf/$ref instead of a
top-level 'type' key. Direct dict access prop_info['type'] and
prop_info['title'] would raise KeyError in those cases (e.g. Dropbox
SEARCH_FILE_OR_FOLDER with an 'options' parameter).

Changes:
- prop_info['type']  -> prop_info.get('type')
- prop_info['title'] -> prop_info.get('title', prop_name)
- FALLBACK_VALUES[prop_type] -> FALLBACK_VALUES.get(prop_type)
- When prop_type is None, delegate to json_schema_to_pydantic_type()
  which already handles all combiner schemas correctly

Fixes #2459
2026-03-08 00:50:16 -05:00
jkomyno a5cb9c1214 fix(python): handle all Python reserved keywords in provider parameter names
The `_python_reserved` set was hardcoded to only `{"for", "async"}`,
missing `"from"` and all other Python keywords. Tools from toolkits like
Intercom that have a `from` parameter caused `ValueError: 'from' is not
a valid parameter name` when building function signatures.

Extracted keyword substitution logic into shared utilities
(`substitute_reserved_python_keywords` / `reinstate_reserved_python_keywords`)
using `keyword.iskeyword()` from stdlib for complete coverage, and applied
it to all affected providers: langchain, gemini, langgraph, autogen, llamaindex.

Closes PLEN-1671
2026-03-03 11:46:32 +04:00
jkomyno 193d06440d fix(py): common-checks 2026-02-06 10:05:56 +04:00
jkomyno ee738a6b93 fix(py): cursorbot 2026-02-06 02:08:50 +04:00
Alberto Schiabel 5fd744dcf3 fix(py): coerce stringified default values to match JSON schema (#2506)
Co-authored-by: jkomyno <12381818+jkomyno@users.noreply.github.com>
2026-01-29 09:36:43 +05:30
jkomyno 3fcb089fde fix(py): fix common checks 2026-01-24 22:26:03 +04:00
jkomyno d159c4600f fix(py): address cursorbot, introduce json-schema-to-pydantic 2026-01-22 04:15:31 +04:00
jkomyno 1fb0881b4e fix(py): address cursorbot 2026-01-22 00:41:49 +04:00
jkomyno aa216f8ea6 fix(py): fix SALESFORCE_CREATE_LEAD type error by implementing anyOf/allOf 2026-01-20 22:56:13 +04:00
devin-ai-integration[bot] a1cf6c589c fix: correct typo in deprecate decorator error message (#2257)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: rahul@composio.dev <rahultarak12345@gmail.com>
2025-12-13 13:01:15 +05:30
Musthaq Ahamad 31521bd1a5 Fix typedocs and examples for toolkit version (#2212)
Co-authored-by: jkomyno <12381818+jkomyno@users.noreply.github.com>
2025-12-04 16:03:23 +05:30
Musthaq Ahamad 9e002c5ca3 Tool Router API Integration (#2214)
Co-authored-by: jkomyno <12381818+jkomyno@users.noreply.github.com>
2025-12-04 15:31:09 +05:30
haxzie d7e13036c0 Fix formatting 2025-10-01 17:01:14 +05:30
Prateek cfadb82689 Typecasts to fix linting errors 2025-10-01 16:20:38 +05:30
Prateek 8286f20092 Solve all omit related issues 2025-10-01 16:12:21 +05:30
haxzie a192ba6489 Fix checks 2025-09-30 13:13:47 +05:30
haxzie b1f130c220 Fix type casting of union/pydantic types 2025-09-30 12:01:08 +05:30
haxzie bcd436609e Fix parser for oneof 2025-09-30 11:48:18 +05:30
haxzie d256568cb5 Format unformated files 2025-09-29 16:50:33 +05:30
haxzie c70a09e64b Fix union types 2025-09-29 16:47:37 +05:30
haxzie 5ff9d16b29 Fix tests 2025-09-29 16:23:50 +05:30
haxzie 4869206d47 Fix invalid lookup to required fields in nested json 2025-09-29 15:37:17 +05:30
Musthaq Ahamad b750b06c60 Fix python sdk type issues (#1949) 2025-09-17 00:50:09 +05:30
Musthaq Ahamad 7077cee688 [WIP] Feat: Add versioning support for tools (#1926)
Co-authored-by: Jayesh Sharma <wjayesh@outlook.com>
2025-09-16 12:15:32 +05:30
Jayesh Sharma 642d9162a5 default to any if type not found in schema 2025-09-03 18:05:15 +05:30
Viraj 8a4b5bc28a feat: add file upload/download utilities (#1669) 2025-06-19 19:00:47 +05:30
angrybayblade 860b1c444a chore: port python sdk to python/ 2025-06-17 12:58:00 +05:30