[
https://issues.apache.org/jira/browse/CAMEL-26416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-26416.
---------------------------------
Resolution: Fixed
Merged via https://github.com/apache/camel/pull/28724 (3390c0cb4812).
_Claude Code on behalf of Claus Ibsen_
> camel-jbang - AI tools: a field read is checked against the fields of the
> JSON data files the routes read
> ---------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-26416
> URL: https://issues.apache.org/jira/browse/CAMEL-26416
> Project: Camel
> Issue Type: Improvement
> Components: camel-jbang, camel-yaml-dsl
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.24.0
>
>
> In the r24 run of the local-model benchmark (qwen3.6:35b on Ollama, Oct 29-30
> 2026), the model read fields that the data does not have. A field that is not
> there is null, so nothing failed, and the logs were wrong:
> * $\{body[lineCount]\} and $\{body[quantity]\} on an order, which has lines
> (route-filter-and-multicast step 2, 2 runs). The read was in the direct:
> route that a multicast sends the order to.
> * $\{body[orderId]\} inside the split of the lines of an order: a line has
> sku, qty and price (connect-http-client step 2).
> The AI tools now read the fields of the JSON data the routes read: the files
> in the directory a file consumer reads, and the file a resource: loads. Data
> whose files do not all have one shape, or with more than 50 files, is left
> out. The validator then checks a simple read of a field of the body after an
> unmarshal of that data:
> * in the route itself, and in the predicates of a filter or a choice;
> * inside a split of a field that holds a list of objects, against the fields
> of those objects. A field of the data that was split gets the advice to read
> it before the split, into a variable;
> * in a direct: or seda: route that every call of the file sends the same data
> to.
> The message names the fields the data has. None of the 85 reference route
> files of the benchmark gets a report.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)