high85%
convert_to_openai_function mishandles optional TypedDict fields (total=False and NotRequired)
The langchain-core function convert_to_openai_function incorrectly marks all fields as required for TypedDict subclasses defined with total=False, and raises TypeError when encountering NotRequired annotations. This results in invalid OpenAI function schemas that impose incorrect required constraints.
