Skip to main content

Module schema

Module schema 

Source
Expand description

Input schema generation: draft 2020-12, no oneOf/anyOf and no nullable type arrays, so the schemas survive Codex’s schema sanitiser.

Functions§

flatten_unions 🔒
Removes the unions schemars emits (nullable types, null alternatives, string enums with documented variants), which Codex would flatten. Optional fields stay out of required instead.
input_schema
The input schema of an args struct, with every subschema inlined so no $ref or $defs depends on client support.
untyped_value
Schema for patch value: deliberately untyped, since block schemas would push tool schemas past client size limits.