pub fn normalize_openai_parameters_schema(input_schema: Value) -> ValueExpand description
Normalize a JSON Schema into the stricter top-level object shape required by OpenAI-compatible function calling APIs.
OpenAI rejects top-level combinators such as oneOf/anyOf on
function.parameters, even when the schema is otherwise valid JSON Schema.
We therefore keep the richer schema for providers that accept it, but strip
only the disallowed top-level keywords for OpenAI requests.