mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-12-05 08:03:01 +00:00
Claude rejects tools whose input_schema has oneOf, anyOf or allOf at the top level (400 "input_schema does not support oneOf, allOf, or anyOf at the top level"). Codex Desktop's automation_update tool has such a schema, so every Responses -> Claude turn that carried it failed. FunctionParametersToInputSchema now merges the branches into one object schema: properties are combined (differing same-name schemas go into a nested anyOf), required is the intersection for oneOf/anyOf and the union for allOf plus the top level's, and other top-level keywords are kept. The tool conversion reports claude_top_level_schema_union_flattened. Schemas without a top-level union are returned byte for byte.