AiDataTypeConverters incorrectly handling multi value Contexts

Created on 15 August 2025, about 2 months ago

Problem/Motivation

ContextDefinitions that support multiple values are evaluated as a whole instead of as individual items in an array. This can create odd behavior as the original value itself may need converting to an array before trying to validate individual items. Such would be the case if AI were to pass a csv string of IDs "1,2,3,4" as an argument to a multi value entity_reference field.

Proposed resolution

For multi value context definitions, pass the value to the converter first with a data type of map?(confirm), then loop through the resulting array and convert the individual parameters against the ContextDefinition data_type. Create a new converter for handling arrays they may be passed as csv strings, json?, yaml?, etc. The json and yaml converters might already work here, so may not be necessary.

Remaining tasks

πŸ› Bug report
Status

Active

Version

1.2

Component

AI Core module

Created by

πŸ‡ΊπŸ‡ΈUnited States michaellander

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024