Skip to content

@composio/json-schema-to-zod@0.3.4

Choose a tag to compare

@sdkrelease sdkrelease released this 12 Oct 12:33
· 807 commits to next since this release
Immutable release. Only release title and notes can be modified.
5ddbb3d

Patch Changes

  • 077ceb3: Fix tool schemas rejected by OpenAI and Anthropic when a parameter uses anyOf, oneOf, allOf, $ref, or similar keywords. The converted schema is a ZodObject again, so the LangChain, Vercel, LlamaIndex, and Claude Agent SDK providers send tool parameters with a top-level type: "object". Patterns with escapes such as \_ or \: no longer fail every call to the tool.
  • d9f6291: Tool schema pattern and patternProperties regexes now run on a linear-time engine (RE2, via re2js), so a hostile pattern such as ^(a+)+$ can no longer hang argument validation. A pattern that needs lookaround still runs on the native engine when a static check shows it cannot backtrack catastrophically, on input up to 1000 characters; otherwise it is left unenforced. A patternProperties key that needs lookaround or a backreference now fails conversion with an InvalidPatternError (reason unsupported). Patterns now match astral characters (emoji) as single characters, as JSON Schema's Unicode regex dialect does.