You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2026/10/14 06:01:00 UTC

[jira] [Created] (CAMEL-25632) camel-jbang - camel_catalog_doc: let one call check several options

Claus Ibsen created CAMEL-25632:
-----------------------------------

             Summary: camel-jbang - camel_catalog_doc: let one call check several options
                 Key: CAMEL-25632
                 URL: https://issues.apache.org/jira/browse/CAMEL-25632
             Project: Camel
          Issue Type: Improvement
          Components: camel-jbang
            Reporter: Claus Ibsen
             Fix For: 4.24.0


AI models check each option they mean to write with its own {{camel_catalog_doc}} call, putting one option name in {{optionsFilter}}. Every answer is right: since CAMEL-25370 and CAMEL-25377, an option of a nested element is found too, under {{nestedOptions}} with the element it goes under. But a step has a limited number of tool calls, and a careful model spends them on lookups before it edits the route.

In a local-model benchmark (21 examples, 3 runs, Qwen3.8 27B with thinking off, 20 tool calls per step):
* connect-file-processing step 3 (adding an onException with redelivery and logging), all 3 runs: 17-18 {{camel_catalog_doc}} calls for {{onException}}, with {{optionsFilter}} redelivery, logStackTrace, logExhausted, logLevel, log, message... The step ran out of calls before the edit.
* connect-service-sql step 1, all 3 runs: 13-14 calls, mostly for {{sql}}: named, batch, onConsume, onConsumeFailed, useMessageBodyForSql...
* Over all runs, 11 steps had 5 or more lookups of one name, and 9 of them failed. qwen3.6 35B-A3B had 3 such steps, and 2 failed.

A second gap: {{optionsFilter=redelivery}} on {{onException}} matches its own options (redeliveryPolicy, retryWhile...), so the nested search is skipped. The options a model needs, {{maximumRedeliveries}} and {{redeliveryDelay}} of {{redeliveryPolicy}}, are not shown.

h3. Proposal

# {{optionsFilter}} takes several terms in one call, comma-separated ({{logStackTrace,logExhausted,maximumRedeliveries}}), and the tool description says so.
# For an EIP, the options of its elements are searched also when its own options match, and both are returned ({{options}} and {{nestedOptions}}).
# After a few lookups of the same name with different filters, answer with all options of the element and its nested elements (bounded, see CAMEL-25541) and a note that this is the full list, as {{RepeatedToolCalls}} does for identical calls.

Code: {{dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/CatalogDocs.java}} (option matching and {{nestedOptions}}), {{AuthoringTools.java}} (the tool description) and {{RepeatedToolCalls.java}}.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)